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
When a ContextRoot caches a context-request event, it stores the event.target. However, if the event is retargeted, this is not the element that fired the event and therefore needs the context to be fulfilled.
Likely instead, it should be caching the root target, or event.composedPath()[0].
Which package(s) are affected?
Context (@lit-labs/context)
Description
When a ContextRoot caches a
context-request
event, it stores theevent.target
. However, if the event is retargeted, this is not the element that fired the event and therefore needs the context to be fulfilled.Likely instead, it should be caching the root target, or
event.composedPath()[0]
.Reproduction
https://lit.dev/playground/#gist=83c8ff4813b2edd082b29fb03557a82b
The bottom element's context value in the example above is not provided due to this issue.
Workaround
I have not found a workaround.
Is this a regression?
Yes. This used to work, but now it doesn't.
Affected versions
all
Browser/OS/Node environment
All
The text was updated successfully, but these errors were encountered: