Conversation
wicket-10.x (10.9.0 through 10.11.0) had a bug where
Wicket.Palette.moveUpHelper called box.trigger('focus') on a plain
DOM <select> element, throwing a TypeError and silently discarding
the reorder before the hidden recorder input was updated. See GitHub
issue #1618, fixed on wicket-10.x in commit 432a7fe.
master was never affected - it dropped jQuery from palette.js and
calls box.focus() directly - but had no test coverage of its own
that would have caught the same class of regression. Adds a QUnit
harness for wicket-extensions' client-side JavaScript (none existed;
only wicket-core's was wired into the grunt/js-test build) and a
regression test asserting that moveUp/moveDown reorder the selection
and update the recorder without throwing, run against both the
JQuery-based and the JQuery-free wicket-ajax engine.
wicket-10.x had a bug where the keydown handler in trap-focus.js
called .trigger('focus') on plain DOM elements returned by
$focusable.get(...), throwing a TypeError instead of wrapping focus
around the trap's boundary. See GitHub issue #1620, fixed on
wicket-10.x in commit cc29182.
master was never affected - it dropped jQuery from this file and
calls .focus() directly on native DOM elements - but had no test
coverage of its own that would have caught the same class of
regression. Adds a QUnit regression test asserting that Tab/Shift+Tab
at the trap's boundaries move focus to the other end without
throwing, run against both the JQuery-based and the JQuery-free
wicket-ajax engine.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1621 +/- ##
=========================================
Coverage 61.89% 61.89%
- Complexity 11242 11244 +2
=========================================
Files 1247 1247
Lines 48367 48367
Branches 6788 6788
=========================================
+ Hits 29935 29936 +1
Misses 15725 15725
+ Partials 2707 2706 -1 🚀 New features to boost your workflow:
|
bitstorm
approved these changes
Sep 27, 2026
solomax
reviewed
Sep 28, 2026
| urls: [ | ||
| 'http://localhost:38887/test/js/all.html?4.0.0' | ||
| 'http://localhost:38887/test/js/all.html?4.0.0', | ||
| 'http://localhost:38888/wicket-extensions/src/test/js/palette.html?4.0.0', |
Contributor
There was a problem hiding this comment.
these versions need to be manually maintained?
Can it be automated somehow? :)
solomax
approved these changes
Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
wicket-10.x (10.9.0+) had two TypeError bugs caused by the jQuery 4.0.0 migration mechanically rewriting
.focus()calls as.trigger('focus')without checking whether the receiver was a jQuery object:Wicket.Palette.moveUpHelpercalledbox.trigger('focus')on a plain DOM<select>. GitHub issue Palette "move up" broken since 10.9.0: moveUpHelper calls box.trigger('focus') on a plain DOM element #1618, fixed onwicket-10.xin bbb...432a7fe.Wicket.trapFocus's keydown handler called.trigger('focus')on plain DOM elements from$focusable.get(...). GitHub issue TrapFocusBehavior: Tab/Shift+Tab at trap boundary throws TypeError on wicket-10.x #1620, fixed onwicket-10.xin cc29182.masterwas never affected by either — it had already dropped jQuery from bothpalette.jsandtrap-focus.jsand calls.focus()directly on native DOM elements. Butmasterhad no test coverage that would have caught this class of regression if it were reintroduced, and wicket-extensions' client-side JavaScript had no QUnit harness at all (only wicket-core's was wired into thegrunt/-Pjs-testbuild).Changes
Two commits, mirroring the wicket-10.x fix PR (#1619):
wicket-extensions/src/test/js/), wired into thegrunt/-Pjs-testbuild via a secondconnectserver target (port 38888), and a regression test forWicket.Palette.moveUp/moveDown.Wicket.trapFocus's Tab/Shift+Tab boundary wrapping.Both tests run against master's dual client-side engines — the jQuery-based
wicket-ajax-jquery.jsand the jQuery-freewicket-ajax.js— matching howwicket-core's own tests already run (qunit:allvsqunit:vanilla).Test plan
grunt jshint connect qunit:all qunit:vanillaintesting/wicket-js-tests— all green in both engines.ApacheLicenceHeaderTestpasses for the new.html/.jsfiles.