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

TypeError: Argument 1 ('element') to Window.getComputedStyle must be an instance of Element #338

Open
pavelmlejnek opened this issue Jul 3, 2024 · 0 comments

Comments

@pavelmlejnek
Copy link

Hello,

we are encountering an issue when this message is logged:

TypeError: Argument 1 ('element') to Window.getComputedStyle must be an instance of Element

Stack trace

this.getDimensions call from there
https://github.com/andreknieriem/simplelightbox/blob/master/src/simple-lightbox.js#L787

And it fails there:
https://github.com/andreknieriem/simplelightbox/blob/master/src/simple-lightbox.js#L1153

According to our stats, it is happening primarily on mobile Safari:

image

I can see from replays we have, that the image is actually not loaded (even if its there and is working on other browsers). Do you have any idea what is wrong?

Thank you in advance

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