hi aditya,

i ve noticed that there are different behaviours for the
KeyPressHandler for each browser (e.g. for me the safari browser did
not recognize the keypressevent).

maybe you can use the KeyDownHandler or KeyUpHandler instead of the
KeyPressHandler. this worked for me....

best, dom



2010/12/3 Aditya <[email protected]>:
> Hi,
>
> I have updated my GWT version to 2.1 and faced some of the problems
> regarding textbox' key press handlers...
>
> the code which works completely fine in previous version is
>
>                       txtPassword.addKeyPressHandler(new
> KeyPressHandler() {
>                       @Override
>                       public void onKeyPress(KeyPressEvent event) {
>
>                                if(event.getCharCode()==KeyCodes.KEY_ENTER){
>                                     // some processing here to send
> username password to server
>                               }
> // class closures.
>
> whenever user presses an ENTER key the code from 'if' condition gets
> executed but this does nt work in GWT 2.1
> is there any other way to perform this validation to know user has
> striked ENTER or not...?
>
> Thanks,
> Aditya
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to