-
Notifications
You must be signed in to change notification settings - Fork 2k
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
g-component custom events can be handled in wrong scope #30
Comments
Fixed by a88671e |
The issue is still happening in shim ShadowDOM. |
Steve made issues/pending/shimShadowComponentEvents test case. |
The problem arises because we are trying to walk into the shadow DOM from composed DOM. Natively, a node exists only in one local DOM and the composed DOM is virtual (and can be ignored). Shim requires that a node exists only in composed DOM, so placeholders are used for other trees (Changelings). Naively, node.changeling is used to locate the shadow DOM subtree where node is intended to exist. Unfortunately, multiple placeholders are used to implement projections and compositions, so node.changeling often refers to the wrong subtree. I've attempted to solve this problem by: (1) making sure that node.changeling is only set once (i.e. cache the initial position only) I may have missed a wrinkle, or there could be negative side-effects, which is why I wanted to document it here. |
fixes issue #30: allow findController to step out of lightDOM
Placing on-eventName="eventNameHandler" on an element in a shadowRoot should call an eventNameHandler method on the host node. This does not occur if the element on which the on- attribute occurs is itself inside a custom component, e.g.
...
The text was updated successfully, but these errors were encountered: