-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Events are not propagated when using sigmajs within the shadow root #1400
Comments
I have also encountered this issue, and would like to propose a potential solution for consideration. According to the MDN mentioned by Tardo,
so the mousemove event has the
This implies that if the event's composed flag is set, the event will propagate with sigma.js/packages/sigma/src/core/captors/mouse.ts Lines 230 to 232 in 7f1785c
It's important to note that occasionally, after clicking the Sandbox's refresh button, an error may display stating
If this happens, pls simply click the button again to proceed. The shadow or light DOM implementations can be toggled by mutating the A potential solution is obtaining the desired target by if (e.target === this.container || e.composedPath()[0] === this.container) BTW, there exist two non-standard methods as per MDN Comparison of Event Targets: |
It would be great if all events were also supported for the shadow dom. |
Is your feature request related to a problem? Please describe.
Events are not propagated when using sigmajs within the shadow root.
Something like this doesn't work:
Describe the solution you'd like
Use 'composed'.
More info: https://developer.mozilla.org/en-US/docs/Web/API/Event/composed
Describe alternatives you've considered
Not use Shadow Root
The text was updated successfully, but these errors were encountered: