Skip to content

Conversation

@trueadm
Copy link
Contributor

@trueadm trueadm commented Dec 9, 2019

This PR refactors the Focus and FocusWithin event responders to remove their root event types. Instead, we attach a set of events to the window once and track focus visible and other properties as globals. We then track the same events in the target phase of the responders and correleate behaviors to ensure the same expectations from before continue to be valid.

This will have a big impact on performance and memory, as having possibly thousands of root events subscribed at once can impact performance.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 9, 2019

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 b014678:

Sandbox Source
laughing-moon-oonsd Configuration

@necolas necolas self-requested a review December 9, 2019 14:23
@sizebot
Copy link

sizebot commented Dec 9, 2019

Warnings
⚠️ Could not find build artifacts for base commit: 9e937e7

Size changes (experimental)

Generated by 🚫 dangerJS against b014678

@sizebot
Copy link

sizebot commented Dec 9, 2019

Warnings
⚠️ Could not find build artifacts for base commit: 9e937e7

Size changes (stable)

Generated by 🚫 dangerJS against b014678

@trueadm trueadm merged commit 3c1efa0 into facebook:master Dec 9, 2019
@trueadm trueadm deleted the improve-focus branch December 9, 2019 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants