Gene, no I need to use text field cause this needs to be filled by user and needs to be proper percentage value (that is why I need validation).
Martin, thanks for your explanation, now I understand how this is happening. S pozdravem / Best regards, Monika Falk, Software Specialist Tieto Message: 1 Date: Wed, 22 Jul 2009 08:17:33 -0400 From: Gene Amtower <[email protected]> Subject: Re: [qooxdoo-devel] Problem with focus in text field To: qooxdoo Development <[email protected]> Message-ID: <1248265053.4319.276.ca...@pcb-bench-01> Content-Type: text/plain; charset="us-ascii" Instead of using a textfield, maybe you could use the spinner widget with the min set to "0" and the max set to "100". Have you looked at that widget for this purpose yet? HTH, Gene On Wed, 2009-07-22 at 13:43 +0200, Martin Wittemann wrote: > Hello Monika, > > > as i tried your example in the playground, i hav seen it working > clicking out of the widget the first time. But when I click the second > time, the focus is lost. Thats because of qooxdoo's property system. > You registered the listener, which sets the focus back to the > textfield, on changeValue. But as the value did not change the second > time, the focus is lost. > You could use the blur event to get your code working: > > > this.__percentageTextField.addListener("blur", function() { > if(this.__percentageTextField.getValue() > 100){ > this.__percentageTextField.focus(); > } > }, this); > > > But the whole scenario looks like you could need some kind of > validation, right? > > > Best, > Martin ------------------------------------------------------------------------------ _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
