You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Add useLayer hook into an app which uses shadow DOM
Provide container in shadow DOM
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
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm trying to use the
useLayer
hook in the shadow DOM. I succeeded in getting the correct styling by using thecontainer
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. Theenvironment
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:
useLayer
hook into an app which uses shadow DOMExpected behavior
Provide a way to add event listeners within the shadow DOM.
Screenshots
The text was updated successfully, but these errors were encountered: