Skip to content

Conversation

@collins-lagat
Copy link

Fixes this issue #427. Related to this other issue on WordPress WordPress/gutenberg#53867

And edge case is when an element exists in an iframe thus the Window object in the iframe will be different from the main Window. Thus thus comparison fails:

: elements instanceof HTMLElement

Iframes tend to be used by page builders such as gutenberg, grapesjs (I haven't tested it here), etc. that rely on iframes for isolation. The fix here fixes this issue.
Any edits are welcome.

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

Successfully merging this pull request may close these issues.

1 participant