views:

116

answers:

3

I would like to update a text field instantly when typing in a GWT TextBox. My problem is that ValueChangeEvent and ChangeEvent handlers only fire when the TextBox loses focus. I thought about using the KeyPressEvent but then nothing would happen when performing a copy paste with the mouse.

What's the simplest way to do that ?

A: 

Why not use combination of both KeyUpHandler and a ChangeHandler on the TextBox? Should take care of immediate feedback on each keystroke as well as copy paste case as well.

Ashwin Prabhu
As I said the ChangeHandler only fires once the TextBox loses focus but I would like to update my field instantly (while the user is typing).
DrDro
Hmmm... Did you figure out a way? Please shares the solution when you do :) Thanks
Ashwin Prabhu
The behaviour change on lose of focus was accepted after all for the app I was working on. So I never did find a solution and left it aside for the moment. But will update the question if ever I find one.
DrDro