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

Images with loading="lazy" attribute break the viewer in Safari #614

Closed
malinowskip opened this issue Oct 10, 2023 · 1 comment
Closed

Comments

@malinowskip
Copy link

Describe the bug
In Safari, if an image possesses a loading="lazy" attribute, then it fails to properly show up in the viewer. The interaction (whatever it is) occurs because the attribute is inherited from the target image by the image displayed in the viewer.

To Reproduce
Try clicking on the image using Safari: https://codepen.io/malinowskip/pen/mdavgGP?editors=1010.

The issue seems to be limited to Safari (browser & mobile versions). I have tested it in Safari 17.0.

Possible solution
This issue could be resolved by preventing the loading attribute from being passed down from the target image to the one displayed in the viewer.

@malinowskip
Copy link
Author

Just found a solution in another issue: #403 (comment). Still, it took me some time to figure out that loading was causing the problem. Is there a reason why this attribute is inherited?

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