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 preventDefault works for nested targets #15633

Merged
merged 2 commits into from
May 13, 2019

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented May 13, 2019

This PR fixes a case with the Press event responder, where preventDefault would not be triggered when an anchor element's child was the target (not the anchor element itself). This uses a isTargetWithinHostComponent under-the-hood to enable this functionality.

@sizebot
Copy link

sizebot commented May 13, 2019

ReactDOM: size: 0.0%, gzip: 0.0%

Details of bundled changes.

Comparing: edfedf3...62b718f

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.development.js +0.1% 0.0% 827.84 KB 828.4 KB 188.94 KB 189 KB UMD_DEV
react-dom.production.min.js 0.0% 0.0% 104.01 KB 104.01 KB 33.81 KB 33.81 KB UMD_PROD
react-dom.profiling.min.js 0.0% 0.0% 107.17 KB 107.17 KB 34.82 KB 34.82 KB UMD_PROFILING
react-dom.development.js +0.1% 0.0% 822.25 KB 822.81 KB 187.39 KB 187.45 KB NODE_DEV
react-dom.production.min.js 0.0% 0.0% 104 KB 104 KB 33.25 KB 33.26 KB NODE_PROD
react-dom.profiling.min.js 0.0% 0.0% 107.35 KB 107.35 KB 34.15 KB 34.16 KB NODE_PROFILING
ReactDOM-dev.js +0.1% 0.0% 846.98 KB 847.54 KB 188.95 KB 189 KB FB_WWW_DEV
ReactDOM-prod.js 🔺+0.2% 🔺+0.1% 347.57 KB 348.1 KB 64.41 KB 64.49 KB FB_WWW_PROD
ReactDOM-profiling.js +0.2% +0.1% 352.8 KB 353.33 KB 65.39 KB 65.47 KB FB_WWW_PROFILING
react-dom-unstable-fire.development.js +0.1% 0.0% 828.17 KB 828.73 KB 189.08 KB 189.15 KB UMD_DEV
react-dom-unstable-fire.production.min.js 0.0% 0.0% 104.02 KB 104.02 KB 33.82 KB 33.82 KB UMD_PROD
react-dom-unstable-fire.profiling.min.js 0.0% 0.0% 107.18 KB 107.18 KB 34.83 KB 34.83 KB UMD_PROFILING
react-dom-unstable-fire.development.js +0.1% 0.0% 822.57 KB 823.13 KB 187.53 KB 187.58 KB NODE_DEV
react-dom-unstable-fire.production.min.js 0.0% 0.0% 104.02 KB 104.02 KB 33.26 KB 33.27 KB NODE_PROD
react-dom-unstable-fire.profiling.min.js 0.0% 0.0% 107.36 KB 107.36 KB 34.16 KB 34.17 KB NODE_PROFILING
ReactFire-dev.js +0.1% 0.0% 846.17 KB 846.72 KB 188.92 KB 188.97 KB FB_WWW_DEV
ReactFire-prod.js 🔺+0.2% 🔺+0.1% 335.56 KB 336.09 KB 61.98 KB 62.04 KB FB_WWW_PROD
ReactFire-profiling.js +0.2% +0.1% 340.76 KB 341.29 KB 62.92 KB 62.98 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.9 KB UMD_PROD
react-dom-test-utils.development.js 0.0% 0.0% 53.95 KB 53.95 KB 14.91 KB 14.91 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% 🔺+0.1% 10.35 KB 10.35 KB 3.82 KB 3.82 KB NODE_PROD
react-dom-unstable-native-dependencies.development.js 0.0% 0.0% 60.76 KB 60.76 KB 15.84 KB 15.85 KB UMD_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% 🔺+0.1% 10.69 KB 10.69 KB 3.66 KB 3.67 KB UMD_PROD
react-dom-unstable-native-dependencies.development.js 0.0% 0.0% 60.43 KB 60.43 KB 15.72 KB 15.72 KB NODE_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% 🔺+0.1% 10.43 KB 10.43 KB 3.56 KB 3.57 KB NODE_PROD
react-dom-server.browser.development.js 0.0% 0.0% 136.73 KB 136.73 KB 35.98 KB 35.99 KB UMD_DEV
react-dom-server.browser.production.min.js 0.0% 0.0% 19.14 KB 19.14 KB 7.22 KB 7.22 KB UMD_PROD
react-dom-server.browser.development.js 0.0% 0.0% 132.86 KB 132.86 KB 35.05 KB 35.05 KB NODE_DEV
react-dom-server.browser.production.min.js 0.0% 0.0% 19.07 KB 19.07 KB 7.21 KB 7.21 KB NODE_PROD
ReactDOMServer-dev.js 0.0% 0.0% 135.21 KB 135.21 KB 34.7 KB 34.71 KB FB_WWW_DEV
ReactDOMServer-prod.js 0.0% 0.0% 47.85 KB 47.85 KB 10.98 KB 10.98 KB FB_WWW_PROD
react-dom-server.node.development.js 0.0% 0.0% 134.81 KB 134.81 KB 35.6 KB 35.6 KB NODE_DEV
react-dom-server.node.production.min.js 0.0% 🔺+0.1% 19.93 KB 19.93 KB 7.51 KB 7.51 KB NODE_PROD
react-dom-unstable-fizz.browser.development.js 0.0% +0.2% 3.66 KB 3.66 KB 1.45 KB 1.45 KB UMD_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.4% 1.21 KB 1.21 KB 703 B 706 B UMD_PROD
react-dom-unstable-fizz.browser.development.js 0.0% +0.2% 3.49 KB 3.49 KB 1.4 KB 1.41 KB NODE_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.5% 1.05 KB 1.05 KB 634 B 637 B NODE_PROD
react-dom-unstable-fizz.node.development.js 0.0% +0.1% 3.74 KB 3.74 KB 1.43 KB 1.43 KB NODE_DEV
react-dom-unstable-fizz.node.production.min.js 0.0% 🔺+0.5% 1.1 KB 1.1 KB 664 B 667 B NODE_PROD

Generated by 🚫 dangerJS

@trueadm trueadm merged commit fec74f9 into facebook:master May 13, 2019
@trueadm trueadm deleted the anchor-prevent-default branch May 13, 2019 12:45
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