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
This implies that if the event's composed flag is set, the event will propagate with event.target being the shadow root's host. However, sigma's captor does not take account for this case so the event is discarded here.
It's important to note that occasionally, after clicking the Sandbox's refresh button, an error may display stating
CustomElementRegistry.define: 'sigma-shadow' has already been defined as a custom element
If this happens, pls simply click the button again to proceed.
The shadow or light DOM implementations can be toggled by mutating the isShadow boolean variable on line 10.
When it's light, the leaveEdge and enterEdge work fine, but not work any more when it's shadow. Wheel and click events work in both contexts.
A potential solution is obtaining the desired target by event.composedPath().
BTW, there exist two non-standard methods as per MDN Comparison of Event Targets: event.originalTarget and event.explicitOriginalTarget, behave as expected in Firefox 123.0a1 (a nightly version), but these methods were not present in Edge 120.0.2210.144.
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: