-
Notifications
You must be signed in to change notification settings - Fork 49.1k
[react-interactions] Add handleSimulateChildBlur upon DOM node removal #17225
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
Conversation
Size changes (experimental)Details of bundled changes.Comparing: a1ff9fd...1fe57d3 react-dom
|
Size changes (stable)ReactDOM: size: 0.0%, gzip: 🔺+0.1% Details of bundled changes.Comparing: a1ff9fd...1fe57d3 react-dom
|
Rever focus-test Add another test
f0be201
to
1bc8a41
Compare
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 1fe57d3:
|
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.
Dispatching only within the Flare system is a good idea
packages/react-interactions/events/src/dom/__tests__/FocusWithin-test.internal.js
Outdated
Show resolved
Hide resolved
packages/react-interactions/events/src/dom/__tests__/FocusWithin-test.internal.js
Outdated
Show resolved
Hide resolved
@sebmarkbage Please can you take another look at this PR when you get a chance? Thanks :) |
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.
I'm still skeptical about dispatching this within the mutation phase but accepting to unblock since it's behind Flare only.
Follow up to #17214.
This PR adds functionality to React Flare, in that a simulated
blur
event is fired when a DOM node being removed when it was actively focused (via the internal event system for Flare). The reason for doing it this way, opposed to withinrestoreSelection
where it's far too late to trigger ablur
event (as the DOM node has already been detached from the tree, so it's impossible to propagate such events).