File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 33## 3.1.7-pre
44
55* Better handle the ` deltaMode ` values 1 (lines) and 2 (pages)
6+ * Attempt to better handle older browsers that use a wheelDelta based on 120
67
78## 3.1.6
89
Original file line number Diff line number Diff line change 139139 lowestDelta = absDelta ;
140140 }
141141
142+ // Assuming that if the lowestDelta is 120, then that the browser
143+ // is treating this as an older mouse wheel event.
144+ // We'll divide it by 40 to try and get a more usable deltaFactor.
145+ if ( lowestDelta === 120 ) {
146+ // Divide all the things by 40!
147+ delta /= 40 ;
148+ deltaX /= 40 ;
149+ deltaY /= 40 ;
150+ lowestDelta /= 40 ;
151+ }
152+
142153 // Get a whole, normalized value for the deltas
143154 delta = Math [ delta >= 1 ? 'floor' : 'ceil' ] ( delta / lowestDelta ) ;
144155 deltaX = Math [ deltaX >= 1 ? 'floor' : 'ceil' ] ( deltaX / lowestDelta ) ;
You can’t perform that action at this time.
0 commit comments