From 3480247348392ea44ff6a0b9aec5c6a9043593df Mon Sep 17 00:00:00 2001 From: BryanTheCrow Date: Tue, 15 Jul 2014 13:34:55 -0700 Subject: [PATCH] Fix Issue #577 - Scrolling way too slow in Firefox This ensures that scroll speed is normal (instead of painfully slow) in the latest versions of Firefox --- src/wheel/wheel.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/wheel/wheel.js b/src/wheel/wheel.js index 6f6ade3a..ce37a20e 100644 --- a/src/wheel/wheel.js +++ b/src/wheel/wheel.js @@ -35,8 +35,13 @@ }, 400); if ( 'deltaX' in e ) { - wheelDeltaX = -e.deltaX; - wheelDeltaY = -e.deltaY; + if (e.deltaMode === 1) { + wheelDeltaX = -e.deltaX * this.options.mouseWheelSpeed; + wheelDeltaY = -e.deltaY * this.options.mouseWheelSpeed; + } else { + wheelDeltaX = -e.deltaX; + wheelDeltaY = -e.deltaY; + } } else if ( 'wheelDeltaX' in e ) { wheelDeltaX = e.wheelDeltaX / 120 * this.options.mouseWheelSpeed; wheelDeltaY = e.wheelDeltaY / 120 * this.options.mouseWheelSpeed;