-
Notifications
You must be signed in to change notification settings - Fork 401
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
fix: escape hatch for async event target accessor #1510
fix: escape hatch for async event target accessor #1510
Conversation
When event's original target is from a non-keyed node, do not retarget event when accessed asynchronously
@@ -66,6 +67,10 @@ function targetGetter(this: Event): EventTarget | null { | |||
// Handle cases where the currentTarget is null (for async events), | |||
// and when an event has been added to Window | |||
if (!(originalCurrentTarget instanceof Node)) { | |||
// If the event's target is being accessed async and originalTarget is not a keyed element, do not retarget |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should add an issue to remove this in the future... with a TODO in the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should also do this in 222 too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed #1511
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just add the TODO for the future removal
Details
When event's original target is from a non-keyed node, do not retarget event when accessed asynchronously
Does this PR introduce breaking changes?
No, it does not introduce breaking changes.
If yes, please describe the impact and migration path for existing applications.
The PR fulfills these requirements: