[
https://issues.apache.org/jira/browse/WICKET-5858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14366105#comment-14366105
]
Tobias Soloschenko edited comment on WICKET-5858 at 3/17/15 9:31 PM:
---------------------------------------------------------------------
This is a different place. You said that you removed the timeout in
"steps.push(function(notify)", but the setTimeout I applied is in the function
"requestFocus: function()".
The reason why I applied it is that if a modal window is opened it is done
within a setTimeout - the call to request the focus is simply added behind
that. So the focus is requested before the modal window is opened and the field
is not receiving the focus:
<![CDATA[(function(){var element = document.getElementById("content3");
var settings = new Object();
settings.minWidth=200;
settings.minHeight=200;
settings.className="w_blue";
settings.width=600;
settings.height=400;
settings.resizable=true;
settings.element=element;
settings.mask="semi-transparent";
settings.autoSize=false;
settings.unloadConfirmation=true;
settings.onClose = function() {
Wicket.Ajax.ajax({"u":"./?0-1.IBehaviorListener.1-window","c":"window2"}); };
window.setTimeout(function(){
Wicket.Window.create(settings).show();
}, 0);
})();(function(){Wicket.Focus.setFocusOnId('field4');})();]]>
was (Author: klopfdreh):
This is a different place. You said that you removed the timeout in
"steps.push(function(notify)", but the setTimeout I applied is in the function
"requestFocus: function()".
The reason why I applied it is that if a modal window is opened it is done
within a setTimeout - the call to request the focus is simply added behind
that. So the focus is requested before the modal window is opened and the field
is not receiving the focus.
> AjaxRequestTarget.focusComponent does not work in modal window
> --------------------------------------------------------------
>
> Key: WICKET-5858
> URL: https://issues.apache.org/jira/browse/WICKET-5858
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 6.19.0
> Reporter: Mikk Lauringson
> Attachments: WICKET-5858.zip
>
>
> Opening modal window and focusing a field in it does not work anymore.
> This worked in Wicket 6.16.0 and older versions, but does not work in 6.17.0,
> 6.18.0 and 6.19.0.
> This is basically same issue as WICKET-5781 but it was wrongly marked as
> duplicate of WICKET-5755 and resolved in 6.19.0. They are actually different
> problems and this problem is still not fixed in 6.19.0.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)