Thanks for sharing this finding, Ilya! On Mon, Jun 14, 2021 at 7:55 AM Ilya Naryzhnyy <phan...@ydn.ru> wrote:
> Hello, > > Here is demo project: > https://github.com/PhantomYdn/wicket-bugs/tree/master/doublefire > After some investigation: it seems to be JQuery bug: > https://github.com/jquery/jquery/issues/4652, but there is a WA: attach > event either to window or document - not both. > Wicket 9.x uses jQuery 3.x with the fix from https://github.com/jquery/jquery/pull/4656 You could update your application to use latest jQuery 3.x too. > > Thanks, > Ilia > --------------------------------------------- > Orienteer(http://orienteer.org) - open source Business Application > Platform > > On Sun, Jun 13, 2021 at 7:08 PM Ilya Naryzhnyy <phan...@ydn.ru> wrote: > > > Hello, > > > > I have found strange Wicket behavior (8.11): ajax events being executed > > twice. The same event leads to 2 invocations to a server. Here is Wicket > > debug console logs (AjaxFormComponentUpdatingBehavior set for unfocus): > > > > INFO: focus set on firstName78 > > INFO: focus removed from firstName78 > > INFO: > > Channel '0' is busy - scheduling the callback to be executed when the > previous request finish. > > INFO: Received ajax response (367 characters) > > INFO: > > > > <?xml version="1.0" encoding="UTF-8"?><ajax-response><component > id="feedbacks87" ><![CDATA[<div id="feedbacks87"> > > > > <div role="alert" class="alert alert-danger"> > > <div>'firstName' is required.</div> > > </div> > > > > > > > </div>]]></component><evaluate><![CDATA[(function(){Wicket.Focus.setFocusOnId('feedbacks87');})();]]></evaluate></ajax-response> > > INFO: focus set on feedbacks87 from server side > > INFO: Response processed successfully. > > INFO: Calling focus on feedbacks87 > > INFO: Calling postponed function... > > INFO: Received ajax response (367 characters) > > INFO: > > > > <?xml version="1.0" encoding="UTF-8"?><ajax-response><component > id="feedbacks87" ><![CDATA[<div id="feedbacks87"> > > > > <div role="alert" class="alert alert-danger"> > > <div>'firstName' is required.</div> > > </div> > > > > > > > </div>]]></component><evaluate><![CDATA[(function(){Wicket.Focus.setFocusOnId('feedbacks87');})();]]></evaluate></ajax-response> > > INFO: returned focused element: [object HTMLDivElement] > > INFO: returned focused element: [object HTMLDivElement] > > INFO: focus set on feedbacks87 from server side > > > > It looks like "busy" Channel 0 is causing somehow. But, btw, nothing is > > happening during this time: so no idea why Channel 0 might be busy. > > > > Do you have any ideas? > > > > Thanks, > > > > Ilia > > --------------------------------------------- > > Orienteer(http://orienteer.org) - open source Business Application > > Platform > > > > >