Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Nested" Fancybox instance ignores "inline" type, using "clone" instead. #670

Open
max-novikov opened this issue Jul 18, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@max-novikov
Copy link

Describe the bug

While trying to open another Fancybox, based on div from html loaded through ajax fancybox, for some reason "inline" type is ignored, and new instance is created as clone. Note that this was not the issue with the v4.

Reproduction

  1. Open some html through Fancybox ajax type. Html in question should contain an element with id attribute and display: none as style.
  2. Programmatically open another Fancybox with src set to the element from step 1 and inline as type.
  3. Instead of showing div in question, Fancybox creates a clone.

test.html attached
test.html.txt
Code to run:
Fancybox.show([{'src': 'test.html','type': 'ajax'}]);
Fancybox.show([{'src': '#sample','type': 'inline'}]);

Additional context

I've tried to upgrade Fancybox from v4 to v5 on my app, and while everything else works after some options rearrangements, the problem described above drives me nuts, as now I need to rewrite lots of markup to escape double-ids.

@max-novikov max-novikov added the needs triage This issue has not been triaged by maintainers label Jul 18, 2024
@fancyapps
Copy link
Owner

Hi,

This is designed to avoid problems when content is moved between Fancybox instances.

@fancyapps fancyapps added enhancement New feature or request and removed needs triage This issue has not been triaged by maintainers labels Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants