Skip to content

Commit 22e2bf7

Browse files
authored
Return event name from getVendorPrefixedEventName (#11951)
1 parent 0deea32 commit 22e2bf7

3 files changed

Lines changed: 27 additions & 30 deletions

File tree

packages/react-dom/src/events/BrowserEventConstants.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@ import getVendorPrefixedEventName from './getVendorPrefixedEventName';
1616
*/
1717
const topLevelTypes = {
1818
topAbort: 'abort',
19-
topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend',
20-
topAnimationIteration:
21-
getVendorPrefixedEventName('animationiteration') || 'animationiteration',
22-
topAnimationStart:
23-
getVendorPrefixedEventName('animationstart') || 'animationstart',
19+
topAnimationEnd: getVendorPrefixedEventName('animationend'),
20+
topAnimationIteration: getVendorPrefixedEventName('animationiteration'),
21+
topAnimationStart: getVendorPrefixedEventName('animationstart'),
2422
topBlur: 'blur',
2523
topCancel: 'cancel',
2624
topCanPlay: 'canplay',
@@ -81,8 +79,7 @@ const topLevelTypes = {
8179
topTouchEnd: 'touchend',
8280
topTouchMove: 'touchmove',
8381
topTouchStart: 'touchstart',
84-
topTransitionEnd:
85-
getVendorPrefixedEventName('transitionend') || 'transitionend',
82+
topTransitionEnd: getVendorPrefixedEventName('transitionend'),
8683
topVolumeChange: 'volumechange',
8784
topWaiting: 'waiting',
8885
topWheel: 'wheel',

packages/react-dom/src/events/getVendorPrefixedEventName.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function getVendorPrefixedEventName(eventName) {
8989
}
9090
}
9191

92-
return '';
92+
return eventName;
9393
}
9494

9595
export default getVendorPrefixedEventName;

scripts/rollup/results.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -46,78 +46,78 @@
4646
"filename": "react-dom.development.js",
4747
"bundleType": "UMD_DEV",
4848
"packageName": "react-dom",
49-
"size": 560498,
50-
"gzip": 132755
49+
"size": 560424,
50+
"gzip": 132739
5151
},
5252
{
5353
"filename": "react-dom.production.min.js",
5454
"bundleType": "UMD_PROD",
5555
"packageName": "react-dom",
56-
"size": 93742,
57-
"gzip": 30770
56+
"size": 93669,
57+
"gzip": 30753
5858
},
5959
{
6060
"filename": "react-dom.development.js",
6161
"bundleType": "NODE_DEV",
6262
"packageName": "react-dom",
63-
"size": 544531,
64-
"gzip": 128982
63+
"size": 544457,
64+
"gzip": 128965
6565
},
6666
{
6767
"filename": "react-dom.production.min.js",
6868
"bundleType": "NODE_PROD",
6969
"packageName": "react-dom",
70-
"size": 92163,
71-
"gzip": 29827
70+
"size": 92090,
71+
"gzip": 29815
7272
},
7373
{
7474
"filename": "ReactDOM-dev.js",
7575
"bundleType": "FB_DEV",
7676
"packageName": "react-dom",
77-
"size": 562017,
78-
"gzip": 131222
77+
"size": 561931,
78+
"gzip": 131204
7979
},
8080
{
8181
"filename": "ReactDOM-prod.js",
8282
"bundleType": "FB_PROD",
8383
"packageName": "react-dom",
84-
"size": 265467,
85-
"gzip": 51292
84+
"size": 265369,
85+
"gzip": 51278
8686
},
8787
{
8888
"filename": "react-dom-test-utils.development.js",
8989
"bundleType": "UMD_DEV",
9090
"packageName": "react-dom",
91-
"size": 41376,
92-
"gzip": 11760
91+
"size": 41302,
92+
"gzip": 11748
9393
},
9494
{
9595
"filename": "react-dom-test-utils.production.min.js",
9696
"bundleType": "UMD_PROD",
9797
"packageName": "react-dom",
98-
"size": 10656,
99-
"gzip": 3935
98+
"size": 10583,
99+
"gzip": 3916
100100
},
101101
{
102102
"filename": "react-dom-test-utils.development.js",
103103
"bundleType": "NODE_DEV",
104104
"packageName": "react-dom",
105-
"size": 36113,
106-
"gzip": 10297
105+
"size": 36039,
106+
"gzip": 10283
107107
},
108108
{
109109
"filename": "react-dom-test-utils.production.min.js",
110110
"bundleType": "NODE_PROD",
111111
"packageName": "react-dom",
112-
"size": 10233,
113-
"gzip": 3848
112+
"size": 10160,
113+
"gzip": 3834
114114
},
115115
{
116116
"filename": "ReactTestUtils-dev.js",
117117
"bundleType": "FB_DEV",
118118
"packageName": "react-dom",
119-
"size": 36840,
120-
"gzip": 10379
119+
"size": 36754,
120+
"gzip": 10368
121121
},
122122
{
123123
"filename": "react-dom-unstable-native-dependencies.development.js",

0 commit comments

Comments
 (0)