You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by dukehoops <ni...@doppelganger.com> on 2007/10/08 20:31:17 UTC

cannot focus on location bar after adding AjaxFormValidatingBehavior

I'd added:

userNameTF.setRequired(true);
//input must be at least 3 characters
userNameTF.add(StringValidator.minimumLength(3));
AjaxFormValidatingBehavior.addToAllFormComponents(loginForm, "onblur");

to a simple login page and now the following happens 100% of the time:

1. I focus on 'userName' TextField
2. I click into browser's location bar but focus is immediately returned to
username TF as "onblur" behavior executes, so it is impossible to focus in
location bar if previous focus was on AJAX-ified input. 

Is there a way to amend behavior:
a) not to regain focus on offending tag (eg one failing validation)? OR
b) do a) only if focus is transferred off page - to location bar or another
window (as opposed to other tag on same page)?

b) would  be better.

thanks,
-nikita
-- 
View this message in context: http://www.nabble.com/cannot-focus-on-location-bar-after-adding-AjaxFormValidatingBehavior-tf4589906.html#a13102162
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org