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") { @Overrideprotected 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: [email protected] For additional commands, e-mail: [email protected]
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
