Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TextField 'Change' Event only triggers on blur

Tags:

java

gwt

gxt

Normally, the Change event will trigger after the TextField loses its focus (on blur).

But I need it to trigger as soon as the value of the field changes, without the need to lose the focus on the field.

The KeyListener doesn't cut it, because the value may come, for example, from a barcode scanner.

Is there any way to do achieve this?

Thanks in advance!

like image 324
Ber Baquero Stand Avatar asked Nov 13 '22 23:11

Ber Baquero Stand


1 Answers

I haven't worked with ext-gwt, but this is what you have to do: You have to use the KeyListener AND add a listener for ONPASTE. The 'Change' event is provided by the browser, and it is triggered only while focus goes away (during a blur), and if text has changed.

like image 57
Raze Avatar answered Jan 03 '23 09:01

Raze