Fields in a form that have errors lose focus on first key press.
For example I have a form with 2 required fields, email and username, in that order. The email field also does regexp validation to enforce the email format. When I submit with both fields empty, they both get validation errors as expected. But when I try to fix email, as soon as I type a character the focus jumps to the next field with an error, username. Focus only stays in email after username is corrected. Then I can fix email as expected.
I hope that is a clear description.
Why does focus jump to the next error field on first key press?
Am I missing a configuration or something?
My form creation is very simple...
thanks
,chris
(SGWT EE 2.5 eval)
For example I have a form with 2 required fields, email and username, in that order. The email field also does regexp validation to enforce the email format. When I submit with both fields empty, they both get validation errors as expected. But when I try to fix email, as soon as I type a character the focus jumps to the next field with an error, username. Focus only stays in email after username is corrected. Then I can fix email as expected.
I hope that is a clear description.
Why does focus jump to the next error field on first key press?
Am I missing a configuration or something?
My form creation is very simple...
Code:
final DynamicForm form = new DynamicForm(); form.setDataSource(DataSource.get(DATA_SOURCE)); form.setFields(new FormItem("email"), new FormItem("username"));
,chris
(SGWT EE 2.5 eval)
Comment