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

isVisible failing with element from a different window #436

Open
cpind opened this issue Apr 11, 2023 · 0 comments
Open

isVisible failing with element from a different window #436

cpind opened this issue Apr 11, 2023 · 0 comments

Comments

@cpind
Copy link

cpind commented Apr 11, 2023

Hey,

I wanted to report a small issue with isVisible function.

I'm working on an application that opens new windows to show some components. We rely on react component for tooltips and popup and we realized that they are failing on those components that run on the new windows. After some investigation we realised that the issue came from the isVisible function that fails when the element comes from another window.

The problem comes from the element instanceof Element that always fails because the `Element' class instance is window dependant.

There is a fix for which is to rely on element.ownerDocument.defaultView.Element instead.

Would accept a PR for this issue?

Best,

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