Skip to content

Commit

Permalink
Fix Issue cubiq#577 - Scrolling way too slow in Firefox
Browse files Browse the repository at this point in the history
This ensures that scroll speed is normal (instead of painfully slow) in the latest versions of Firefox
  • Loading branch information
BryanTheCrow committed Jul 15, 2014
1 parent 4ef4a80 commit 3480247
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/wheel/wheel.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3480247

Please sign in to comment.