You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Carlos Pita (JIRA)" <ji...@apache.org> on 2007/11/03 06:42:56 UTC

[jira] Commented: (WICKET-957) Change default focus component for focus related events to null

    [ https://issues.apache.org/jira/browse/WICKET-957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539795 ] 

Carlos Pita commented on WICKET-957:
------------------------------------


Yes, the decisive factor here is what this other field happens to be.
If it is a widget of the browser own ui it won't keep focus after
validation takes place. There are some third party components (of
which I'm aware of tinymce) that present a similar behavior too. All
in all, the resulting user experience is quite odd.


> Change default focus component for focus related events to null
> ---------------------------------------------------------------
>
>                 Key: WICKET-957
>                 URL: https://issues.apache.org/jira/browse/WICKET-957
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-beta3
>            Reporter: Carlos Pita
>            Priority: Minor
>             Fix For: 1.3.0-beta5
>
>
> Currently the default behavior for ajax requests is to restore focus on last focused element. This produces some bizarre situations when onfocus or onblur are used for ajax validation.
> For example, if the form component to be validated gets its focus transferred to some browser ui widget (say, the location bar), triggering an onblur validation this way, it immediately recaptures focus after validation has been completed (making it impossible to type text at the location bar unless your fingers happen to be faster than the ajax rtt, to follow the example). A similar problem occurs with tinymce editor, at least.
> This behavior can be circumvented explicitly setting target.focusComponent(null) for validation purposes, but why is it not this way in the first place, at least for the focus related events? With a better behaved default quite a number of ugly situations for such common use case as ajax validation is could be avoided.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.