Skip to content

Update jquery.mousewheel to 3.2.2 - #10

Merged
erseco merged 1 commit into
mainfrom
fix/update-jquery-mousewheel-3.2.2
Sep 19, 2026
Merged

erseco merged 1 commit into
mainfrom
fix/update-jquery-mousewheel-3.2.2

Conversation

@erseco

@erseco erseco commented Sep 19, 2026

Copy link
Copy Markdown

What changed upstream

Two releases since 3.1.13, and only 3.2.0 carries functional change:

  • .on()/.off() for event binding where available
  • no longer clobbers the event's offsetX/offsetY when it has not adjusted them (#165)
  • bower/executable-bit/ESLint housekeeping

3.2.1 is a README update; 3.2.2 adds the minified file to the npm package. Neither of the functional changes affects how mindmaps uses the plugin, and both are improvements under jQuery 3.7.1. Most of the diff is a reformat from the project's move to ESLint flat config.

Handler now reads event.deltaY

this.$getContainer().bind("mousewheel", function(e) {
  var vertical = e.deltaY;
  if (!vertical) { return; }
  if (self.mouseWheeled) { self.mouseWheeled(vertical); }
});

The plugin sets the normalised deltaX/deltaY/deltaFactor on the event object; the extra callback arguments remain only for compatibility. Reading the event property is the non-deprecated half of the API.

Behaviour is unchanged — vertical wheel zooms, horizontal-only wheel does not — and the guard that makes that true is untouched. No other wheel handling was refactored.

Provenance

sha256  ca6ed6b8f937a4d5ad42ec2dec05d22031d26dc0b1a741650d98e397ffb5fc2a

Identical in the 3.2.2 git tag and the jquery-mousewheel@3.2.2 npm tarball, fetched independently and compared. MIT header intact, no reformatting on our side.

Validation

npm ci && npm test && npm run build 12 tests pass
Two clean builds byte-identical (bfe2368c5e8e…)
eXeLearning Playwright suite against a build of this branch 25 passed

The browser suite includes the horizontal-wheel assertion, which asserts after each gesture rather than scrolling one way and back — a paired scroll cancels out and would hide a regression.

The build contract test now pins what the application actually depends on: the special event is registered, event.deltaX/deltaY are set, and the zoom reads deltaY.

Two releases since 3.1.13, and only 3.2.0 carries functional change: the
plugin binds with .on()/.off() where available, and it no longer overwrites
the event's offsetX/offsetY when it has not adjusted them. Neither affects
how mindmaps uses it, and both are improvements under jQuery 3.7.1. The rest
of the diff is a reformat from the project's move to ESLint flat config.

The zoom handler now reads event.deltaY instead of the extra callback
arguments. The plugin sets the normalised deltas on the event object itself,
and that is the part of its API that is not deprecated; the arguments remain
only for compatibility. Behaviour is unchanged -- vertical wheel zooms, a
horizontal-only wheel does not -- and the guard that makes that true is
untouched.

The file is upstream's own, byte for byte: sha256
ca6ed6b8f937a4d5ad42ec2dec05d22031d26dc0b1a741650d98e397ffb5fc2a, identical
in the jquery/jquery-mousewheel 3.2.2 git tag and the npm tarball, fetched
separately and compared. MIT header intact, nothing reformatted here.

The build contract test now pins what the application actually depends on:
that the plugin registers the special event and sets event.deltaX/deltaY, and
that the zoom reads deltaY.

Two clean builds are byte-identical. eXeLearning's browser suite passes all
25 tests against a build of this branch.
@erseco
erseco merged commit a8a979a into main Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant