TextBox KeyPressEvent doesn't function in Firefox 4

36 views
Skip to first unread message

Gabriel

unread,
Apr 8, 2011, 10:05:43 AM4/8/11
to Google Web Toolkit
Eg.

txtPwd.addKeyPressHandler(new KeyPressHandler() {

@Override
public void onKeyPress(KeyPressEvent event) {
if (event.getCharCode() == KeyCodes.KEY_ENTER) {
btnLogin.click();
}
}
});

Regards.

PD: I think in Firefox 3.x doesn't function.

Nicolas Antoniazzi

unread,
Apr 8, 2011, 10:20:04 AM4/8/11
to google-we...@googlegroups.com, Gabriel
As a workaround, you can use event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER

2011/4/8 Gabriel <volpeg...@gmail.com>

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


Gabriel Volpe

unread,
Apr 8, 2011, 10:37:44 AM4/8/11
to google-we...@googlegroups.com
Thanks Nicolas, that's work!

2011/4/8 Nicolas Antoniazzi <nicolas.a...@gmail.com>



--
 
               Duke 'n' Tux

Reply all
Reply to author
Forward
0 new messages