papegaaij commented on PR #1652:
URL: https://github.com/apache/wicket/pull/1652#issuecomment-6015492669

   I pushed 5b0d6a4d08 on top of this branch.
   
   Wrapping `stopPropagation()` so that it cancels the event at any phase broke 
handlers on the form. When one handler on the form stopped the propagation, the 
event was cancelled before the handlers registered after it on the same form 
ran: they saw it cancelled already, and one of them cancelling it no longer 
stopped the Ajax request, as `triggerSubmit()` returned true.
   
   `stopPropagation()` now only cancels the event in the capturing phase, when 
a handler on an ancestor keeps it from reaching the form. Once the event is at 
the form, the listener added last on the form cancels it as before. 
`stopImmediatePropagation()` still cancels it at once, as it skips that 
listener too.
   
   The new QUnit test "a handler on the form cancelling after another one 
stopped the propagation stops the Ajax request" fails without the change with 
both engines. With it, the suite passes in Chrome (155/154) and Firefox 156.
   


-- 
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