reiern70 opened a new pull request, #1621:
URL: https://github.com/apache/wicket/pull/1621

   ## 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.moveUpHelper` called `box.trigger('focus')` on a plain DOM 
`<select>`. GitHub issue #1618, fixed on `wicket-10.x` in bbb...432a7fee87.
   - `Wicket.trapFocus`'s keydown handler called `.trigger('focus')` on plain 
DOM elements from `$focusable.get(...)`. GitHub issue #1620, fixed on 
`wicket-10.x` in cc29182a0a.
   
   `master` was never affected by either — it had already dropped jQuery from 
both `palette.js` and `trap-focus.js` and calls `.focus()` directly on native 
DOM elements. But `master` had 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 the 
`grunt`/`-Pjs-test` build).
   
   ## Changes
   
   Two commits, mirroring the wicket-10.x fix PR (#1619):
   
   1. Adds a QUnit harness for wicket-extensions 
(`wicket-extensions/src/test/js/`), wired into the `grunt`/`-Pjs-test` build 
via a second `connect` server target (port 38888), and a regression test for 
`Wicket.Palette.moveUp`/`moveDown`.
   2. A regression test for `Wicket.trapFocus`'s Tab/Shift+Tab boundary 
wrapping.
   
   Both tests run against master's dual client-side engines — the jQuery-based 
`wicket-ajax-jquery.js` and the jQuery-free `wicket-ajax.js` — matching how 
`wicket-core`'s own tests already run (`qunit:all` vs `qunit:vanilla`).
   
   ## Test plan
   
   - [x] `grunt jshint connect qunit:all qunit:vanilla` in 
`testing/wicket-js-tests` — all green in both engines.
   - [x] `ApacheLicenceHeaderTest` passes for the new `.html`/`.js` files.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to