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

Multilevel shadowDoms not working as expected, popup closes on click inside target #470

Closed
Psvensso opened this issue Jul 10, 2024 · 0 comments · Fixed by #471
Closed

Multilevel shadowDoms not working as expected, popup closes on click inside target #470

Psvensso opened this issue Jul 10, 2024 · 0 comments · Fixed by #471

Comments

@Psvensso
Copy link
Contributor

When using the trigger inside multi level shadowDoms the "is click inside" functionality is not working as expected.
The current implementation inPopupOrChild checks if the click event target is in the popup element. Then checks if the shadow the popup belongs to is the target due to event re-targeting.

This fails when there are multiple levels of shadow so the event has been re-targeted multiple times.
This can be fixed by also checking the compostedPath of the event in useWinClick to try to find the actual click event target.

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 a pull request may close this issue.

1 participant