Skip to content

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

@pavelmlejnek

Description

@pavelmlejnek

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions