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

Magnific Popup does not ignore leading comments in HTML #1200

Open
kylesnowschwartz opened this issue Sep 20, 2023 · 0 comments
Open

Magnific Popup does not ignore leading comments in HTML #1200

kylesnowschwartz opened this issue Sep 20, 2023 · 0 comments

Comments

@kylesnowschwartz
Copy link

Reproduction:

In my Ruby on Rails application, enable config.action_view.annotate_rendered_view_with_filenames which adds leading comments to the document. This shows the file path of the view partial rendered as a leading comment in the html.

When using Magnific popup with this enabled, it considers the target of the html being clicked to be the leading comment (which is the closest node) rather than the actual HTML element being clicked on.

This in turn makes the _checkIfClose() return true, because the target is not equal to the first item in mfp.content[0]

Desired:

MP ignores html comments and does not consider them a part of the content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant