wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sven Meier <s...@meiers.net>
Subject Re: textfield focus not working on FF
Date Wed, 14 Jun 2017 16:49:22 GMT
Hi,

your quickstart works fine here with Firefox

Have fun
Sven


Am 13.06.2017 um 23:35 schrieb trlt:
> Hi,
>
> I have a form with 2 textfields (field1, field2).  I want to be able to set
> the focus on field1 again when user finishes entering data in field2.  The
> code works fine on Chrome, but it doesn't work on FF (i.e. the focus on
> field1 is not set).  I've included the sample source code below:
>
>          Form form = new Form("form");
>          form.setDefaultModel(new CompoundPropertyModel(formModel = new
> HashMap()));
>          add(form);
>          
>          final TextField field1 = new TextField("field1", String.class);
>          field1.setMarkupId("field1");
>          form.add(field1);
>          
>          final TextField field2 = new TextField("field2", String.class);
>          field2.setMarkupId("field2");
>          form.add(field2);
>          
>          field2.add(new AjaxFormComponentUpdatingBehavior("onblur") {
>              
>              @Override
>              protected void onUpdate(AjaxRequestTarget target) {
>                  target.add(field1.setDefaultModelObject(null));
>                  target.add(field2.setDefaultModelObject(null));
>                  target.focusComponent(field1);
>              }
>          });
>
> Can someone help me understand what I might have been missing? I've also
> included a quickstart to illustrate my problems. Thanks!
>
> quickstart.zip
> <http://apache-wicket.1842946.n4.nabble.com/file/n4678031/quickstart.zip>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/textfield-focus-not-working-on-FF-tp4678031.html
> Sent from the Users forum 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
>


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


Mime
View raw message