Skip to content

Commit f9718a8

Browse files
committedMar 14, 2025
fixup! Restore jQuery 1.2 compatibility, test all supported jQuery minor lines
1 parent 2dc99bf commit f9718a8

File tree

3 files changed

+6
-85
lines changed

3 files changed

+6
-85
lines changed
 

‎.github/workflows/browserstack.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,6 @@ jobs:
6161

6262
- name: Run tests
6363
run: |
64-
npm run test:unit -- -v -c jtr-isolate.yml \
64+
npm run test:unit -- -v --retries 3 --hard-retries 1 \
6565
--browserstack "${{ matrix.BROWSER }}" \
6666
--run-id ${{ github.run_id }}

‎jquery.mousewheel.js

+5-7
Original file line numberDiff line numberDiff line change
@@ -212,25 +212,23 @@
212212
// Add event and delta to the front of the arguments
213213
args.unshift( event, delta, deltaX, deltaY );
214214

215-
// Clearout lowestDelta after sometime to better
215+
// Clear out lowestDelta after sometime to better
216216
// handle multiple device types that give different
217217
// a different lowestDelta
218218
// Ex: trackpad = 3 and mouse wheel = 120
219219
if ( nullLowestDeltaTimeout ) {
220220
window.clearTimeout( nullLowestDeltaTimeout );
221221
}
222-
nullLowestDeltaTimeout = window.setTimeout( nullLowestDelta, 200 );
222+
nullLowestDeltaTimeout = window.setTimeout( function() {
223+
lowestDelta = null;
224+
}, 200 );
223225

224226
return ( $.event.dispatch || $.event.handle ).apply( this, args );
225227
}
226228

227-
function nullLowestDelta() {
228-
lowestDelta = null;
229-
}
230-
231229
function shouldAdjustOldDeltas( orgEvent, absDelta ) {
232230

233-
// If this is an older event and the delta is divisable by 120,
231+
// If this is an older event and the delta is divisible by 120,
234232
// then we are assuming that the browser is treating this as an
235233
// older mouse wheel event and that we should divide the deltas
236234
// by 40 to try and get a more usable deltaFactor.

‎jtr-isolate.yml

-77
This file was deleted.

0 commit comments

Comments
 (0)