Skip to content
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

[react-events] Focus/FocusWithin responders with fallbacks #16343

Merged
merged 1 commit into from
Aug 12, 2019

Conversation

necolas
Copy link
Contributor

@necolas necolas commented Aug 9, 2019

Separate the PointerEvent and fallback implementations.
Fix the unit tests to cover both PointerEvent and non-PointerEvent environments.
Fix the focus-visible related callbacks to get called when keys other than "Tab" are used.

@sizebot
Copy link

sizebot commented Aug 9, 2019

Details of bundled changes.

Comparing: 5b00757...ea43995

react-events

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-events-focus.development.js +10.1% +11.6% 10.16 KB 11.18 KB 2.13 KB 2.37 KB UMD_DEV
react-events-press.development.js 0.0% -0.0% 20.53 KB 20.53 KB 4.81 KB 4.81 KB UMD_DEV
react-events-focus.production.min.js 🔺+7.0% 🔺+5.9% 3.94 KB 4.22 KB 1.32 KB 1.4 KB UMD_PROD
react-events-input.production.min.js 0.0% 🔺+0.1% 1.82 KB 1.82 KB 972 B 973 B UMD_PROD
react-events-swipe.production.min.js 0.0% 🔺+0.1% 2.63 KB 2.63 KB 1.19 KB 1.19 KB UMD_PROD
react-events-context-menu.production.min.js 0.0% 🔺+0.2% 1.2 KB 1.2 KB 666 B 667 B NODE_PROD
react-events-swipe.production.min.js 0.0% 🔺+0.1% 2.45 KB 2.45 KB 1.14 KB 1.14 KB NODE_PROD
react-events-scroll.development.js 0.0% +0.1% 5.9 KB 5.9 KB 1.59 KB 1.59 KB UMD_DEV
react-events-hover.development.js 0.0% +0.1% 6.9 KB 6.9 KB 1.51 KB 1.51 KB NODE_DEV
react-events-focus.development.js +10.3% +12.1% 9.97 KB 11 KB 2.08 KB 2.33 KB NODE_DEV
react-events-focus.production.min.js 🔺+7.4% 🔺+5.5% 3.77 KB 4.04 KB 1.26 KB 1.33 KB NODE_PROD
react-events-drag.development.js 0.0% +0.1% 5.92 KB 5.92 KB 1.66 KB 1.66 KB UMD_DEV
react-events-drag.production.min.js 0.0% 🔺+0.1% 2.48 KB 2.48 KB 1.14 KB 1.15 KB UMD_PROD
ReactEventsFocus-dev.js +9.2% +10.4% 10.01 KB 10.94 KB 2.13 KB 2.35 KB FB_WWW_DEV
react-events-keyboard.production.min.js 0.0% -0.1% 1.88 KB 1.88 KB 1.01 KB 1.01 KB UMD_PROD
ReactEventsFocus-prod.js 🔺+5.8% 🔺+5.0% 7.88 KB 8.33 KB 1.63 KB 1.71 KB FB_WWW_PROD
react-events-drag.development.js 0.0% -0.0% 7.68 KB 7.68 KB 2.33 KB 2.33 KB NODE_DEV
react-events-keyboard.production.min.js 0.0% -0.1% 1.7 KB 1.7 KB 962 B 961 B NODE_PROD

Generated by 🚫 dangerJS

Separate the PointerEvent and fallback implementations.
Fix the unit tests to cover both PointerEvent and non-PointerEvent environments.
Fix the focus-visible related callbacks to get called when keys other than "Tab" are used.
Copy link
Contributor

@trueadm trueadm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


const rootEventTypes = hasPointerEvents
? ['keydown', 'keyup', 'pointermove', 'pointerdown', 'pointerup']
: ['keydown', 'keyup', 'mousedown', 'touchmove', 'touchstart', 'touchend'];
Copy link
Contributor

@TrySound TrySound Aug 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mouseup and mousemove are missing. Is it intentional?

@necolas necolas merged commit 107521a into facebook:master Aug 12, 2019
@necolas necolas deleted the react-events/focus-tests branch December 20, 2019 15:36
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.

5 participants