From 599dcf3096e07ec0882b8f33b91e86b143b7281d Mon Sep 17 00:00:00 2001 From: Brandon Aaron Date: Thu, 14 Nov 2013 10:35:39 -0500 Subject: [PATCH] Fix how delta is set when deltaY and deltaX has a value --- jquery.mousewheel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jquery.mousewheel.js b/jquery.mousewheel.js index 59951c577..cb1b5c7cd 100755 --- a/jquery.mousewheel.js +++ b/jquery.mousewheel.js @@ -82,8 +82,8 @@ // Firefox < 17 horizontal scrolling related to DOMMouseScroll event if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) { + deltaX = deltaY * -1; deltaY = 0; - deltaX = delta * -1; } // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy @@ -96,7 +96,7 @@ } if ( 'deltaX' in orgEvent ) { deltaX = orgEvent.deltaX; - delta = detlaX * -1; + if ( deltaY === 0 ) { delta = deltaX * -1; } } // No change actually happened, no reason to go any further