papegaaij opened a new pull request, #1648: URL: https://github.com/apache/wicket/pull/1648
Fixes #1646. `Wicket.Event.add` in `wicket-ajax-jquery.js` recorded a listener under the whole type string, e.g. `'input change'`. `Wicket.Event.remove` splits the type on whitespace before looking it up, so it never found a listener added for several types and unbound nothing. This is a regression from 10.x, where `remove` delegated to `jQuery#off`. `add` now records the listener under each type separately, as `wicket-ajax.js` already does. That makes removal work for all the types at once and for each type on its own. Wicket's own code always adds one type at a time, so only application scripts are affected. Tests: three QUnit tests in `wicket-core/src/test/js/event.js`, run against both engines. They cover removing all of the types, removing just one of them, and removing by type without a handler. All three fail on master's `wicket-ajax-jquery.js` and pass with the fix. `mvn clean verify -Pjs-test` is green. 🤖 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]
