Re: Ajax events invoked twice
Thanks for sharing this finding, Ilya! On Mon, Jun 14, 2021 at 7:55 AM Ilya Naryzhnyy 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 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: > > > > id="feedbacks87" > > > 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: > > > > id="feedbacks87" > > > 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 > > > > >
Re: Ajax events invoked twice
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. Thanks, Ilia - Orienteer(http://orienteer.org) - open source Business Application Platform On Sun, Jun 13, 2021 at 7:08 PM Ilya Naryzhnyy 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: > > id="feedbacks87" > > 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: > > id="feedbacks87" > > 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 > >
Ajax events invoked twice
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: 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: 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