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

[BUG] shadow DOM not working via environment parameter #84

Open
elseee opened this issue Mar 10, 2022 · 0 comments
Open

[BUG] shadow DOM not working via environment parameter #84

elseee opened this issue Mar 10, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@elseee
Copy link

elseee commented Mar 10, 2022

Describe the bug
I'm trying to use the useLayer hook in the shadow DOM. I succeeded in getting the correct styling by using the container parameter. Some of the behaviour, like clicking outside the layer, still doesn't work though. This is happening because event listeners are added to the window and not in the shadow DOM itself. The environment seems to be a parameter that could fix this issue, however it has to be of type Window and it throws an error if the root element of the shadow DOM is used. (see screenshot).

To Reproduce
Steps to reproduce the behavior:

  1. Add useLayer hook into an app which uses shadow DOM
  2. Provide container in shadow DOM
  3. Event handlers aren't added to the shadow DOM, but to the window

Expected behavior
Provide a way to add event listeners within the shadow DOM.

Screenshots
Screenshot 2022-03-10 at 13 53 07

@elseee elseee added the bug Something isn't working label Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant