Re: onchange event always being fired before onclick event

2014-01-31 Thread Martin Grigorov
Hi, Wicket tries to preserve the focus on the the last focused element - https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js?source=c#L2465 So it should work out of the box. What is the type of the element you try to focus ? i

Re: onchange event always being fired before onclick event

2014-01-30 Thread Paul Bors
Btw, your use-case sounds strange. Why would you refresh what's in focus via some other's tag onChange? Why not just simply refresh whatever component lost focus whenever its onChagne is fired? On Thu, Jan 30, 2014 at 3:37 PM, Paul Bors wrote: > What makes you think that the only way to focus o

Re: onchange event always being fired before onclick event

2014-01-30 Thread Paul Bors
What makes you think that the only way to focus on something is by clicking on it? I would aproach your problem from a different angle. I would ask the browser to give me whatever has the focus via document.activeElement: https://developer.mozilla.org/en-US/docs/Web/API/document.activeElement http