Mousewheel fixes for Firefox and IE 10.

Now tested with the latest versions of following browsers.

In OS X:
Chrome
Firefox
Safari

In Windows:
Chrome
Firefox
Internet Explorer 10
Opera
Safari
This commit is contained in:
Hyunje Alex Jun 2014-09-15 22:53:40 +01:00
parent 0fc81dfa83
commit d3181f0b0d

View File

@ -348,6 +348,18 @@
deltaY = e.originalEvent.wheelDeltaY / 6; deltaY = e.originalEvent.wheelDeltaY / 6;
} }
if (e.originalEvent.deltaMode && e.originalEvent.deltaMode === 1) {
// Firefox in deltaMode 1: Line scrolling
deltaX *= 10;
deltaY *= 10;
}
if (deltaX !== deltaX && deltaY !== deltaY/* NaN checks */) {
// IE in some mouse drivers
deltaX = 0;
deltaY = e.originalEvent.wheelDelta;
}
return [deltaX, deltaY]; return [deltaX, deltaY];
}; };