mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Remove MouseWheel and MouseDOMScroll event patching
The `wheel` event has not always been supported in every browser. React would fall back to `mousewheel` and `DOMMouseScroll` when the `wheel` event was not available. All supported browsers provide the `wheel` event. This code is no longer necessary.
This commit is contained in:
1 parent
57aef3f00e
commit
bd9dbd5d60
1 file changed
+1
-11
+1
-11
@@ -123,17 +123,7 @@ export function listenTo(registrationName, contentDocumentHandle) {
|
||||
for (var i = 0; i < dependencies.length; i++) {
|
||||
var dependency = dependencies[i];
|
||||
if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
|
||||
if (dependency === 'topWheel') {
|
||||
if (isEventSupported('wheel')) {
|
||||
trapBubbledEvent('topWheel', 'wheel', mountAt);
|
||||
} else if (isEventSupported('mousewheel')) {
|
||||
trapBubbledEvent('topWheel', 'mousewheel', mountAt);
|
||||
} else {
|
||||
// Firefox needs to capture a different mouse scroll event.
|
||||
// @see http://www.quirksmode.org/dom/events/tests/scroll.html
|
||||
trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);
|
||||
}
|
||||
} else if (dependency === 'topScroll') {
|
||||
if (dependency === 'topScroll') {
|
||||
trapCapturedEvent('topScroll', 'scroll', mountAt);
|
||||
} else if (dependency === 'topFocus' || dependency === 'topBlur') {
|
||||
trapCapturedEvent('topFocus', 'focus', mountAt);
|
||||
|
||||
Reference in new issue
Block a user