Skip to content

Commit 36ece57

Browse files
committed
Do not fire the event if there is no change in deltaX and deltaY
1 parent b1a0761 commit 36ece57

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

jquery.mousewheel.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@
100100
delta = detlaX * -1;
101101
}
102102

103+
// No change actually happened, no reason to go any further
104+
if ( deltaY === 0 && deltaX === 0 ) { return; }
105+
103106
// Look for lowest delta to normalize the delta values
104107
absDelta = Math.abs(delta);
105108
if ( !lowestDelta || absDelta < lowestDelta ) { lowestDelta = absDelta; }

0 commit comments

Comments
 (0)