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

Event API: ensure event keys are unique + add validation #15501

Merged
merged 3 commits into from Apr 26, 2019

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Apr 25, 2019

This PR fixes related issues around collisions in event name maps. We used to only use the event name to determine if an event is being listened to by a responder. The issue is that this falls apart when events with the same name, but different properties (i.e. passive, capture) are applied, meaning we get over fires of event listeners on event responders.

Ref #15257

@sizebot
Copy link

sizebot commented Apr 25, 2019

ReactDOM: size: 0.0%, gzip: -0.0%

Details of bundled changes.

Comparing: d1f667a...5d9ce0a

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.development.js +0.1% +0.1% 818.38 KB 819.56 KB 186.36 KB 186.62 KB UMD_DEV
react-dom.production.min.js 0.0% -0.0% 103.68 KB 103.68 KB 33.69 KB 33.69 KB UMD_PROD
react-dom.development.js +0.1% +0.1% 812.86 KB 814.04 KB 184.82 KB 185.08 KB NODE_DEV
react-dom.production.min.js 0.0% 0.0% 103.67 KB 103.67 KB 33.13 KB 33.13 KB NODE_PROD
react-dom.profiling.min.js 0.0% -0.0% 107 KB 107 KB 33.98 KB 33.98 KB NODE_PROFILING
ReactDOM-dev.js +0.1% +0.1% 837.34 KB 838.45 KB 186.27 KB 186.54 KB FB_WWW_DEV
ReactDOM-prod.js 🔺+0.1% 🔺+0.2% 344.23 KB 344.54 KB 63.67 KB 63.77 KB FB_WWW_PROD
ReactDOM-profiling.js +0.1% +0.2% 349.63 KB 349.93 KB 64.65 KB 64.76 KB FB_WWW_PROFILING
react-dom-unstable-fire.development.js +0.1% +0.1% 818.7 KB 819.88 KB 186.5 KB 186.75 KB UMD_DEV
react-dom-unstable-fire.production.min.js 0.0% -0.0% 103.69 KB 103.69 KB 33.7 KB 33.7 KB UMD_PROD
react-dom-unstable-fire.profiling.min.js 0.0% -0.0% 106.84 KB 106.84 KB 34.68 KB 34.68 KB UMD_PROFILING
react-dom-unstable-fire.development.js +0.1% +0.1% 813.18 KB 814.36 KB 184.95 KB 185.21 KB NODE_DEV
react-dom-unstable-fire.profiling.min.js 0.0% -0.0% 107.01 KB 107.01 KB 33.99 KB 33.99 KB NODE_PROFILING
ReactFire-dev.js +0.1% +0.2% 836.53 KB 837.64 KB 186.23 KB 186.52 KB FB_WWW_DEV
ReactFire-prod.js 🔺+0.1% 🔺+0.2% 332.23 KB 332.54 KB 61.26 KB 61.37 KB FB_WWW_PROD
ReactFire-profiling.js +0.1% +0.2% 337.59 KB 337.9 KB 62.23 KB 62.34 KB FB_WWW_PROFILING
react-dom-test-utils.development.js 0.0% -0.0% 54.23 KB 54.23 KB 14.98 KB 14.98 KB UMD_DEV
react-dom-test-utils.production.min.js 0.0% 🔺+0.1% 10.56 KB 10.56 KB 3.89 KB 3.89 KB UMD_PROD
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 60.76 KB 60.76 KB 15.85 KB 15.84 KB UMD_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% -0.0% 10.69 KB 10.69 KB 3.67 KB 3.66 KB UMD_PROD
react-dom-server.browser.development.js 0.0% -0.0% 132.63 KB 132.63 KB 34.99 KB 34.99 KB NODE_DEV
ReactDOMServer-prod.js 0.0% 0.0% 46.91 KB 46.91 KB 10.77 KB 10.77 KB FB_WWW_PROD
react-dom-server.node.development.js 0.0% -0.0% 134.57 KB 134.57 KB 35.54 KB 35.54 KB NODE_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.2% 1.05 KB 1.05 KB 636 B 635 B NODE_PROD

Generated by 🚫 dangerJS

@trueadm trueadm merged commit 8658611 into facebook:master Apr 26, 2019
@trueadm trueadm deleted the ensure-event-keys-are-unique branch April 26, 2019 07:01
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.

None yet

4 participants