Make sure that ENTER works in all text fields
There is a bug in gwt 2.1.0 [1] that prevents that pressing the ENTER key is properly recognized and so actions that are connected with pressing ENTER are not triggered. Examples: - confirming a query in the query input field with ENTER does not trigger the query - confirming the login information in the UserPassSignInDialog with ENTER does not trigger the login - confirming to add a reviewer in the ChangeScreen with ENTER does not add the reviewer This problem only affects some browsers (e.g. Firefox, older versions of Google Chrome). The new code was tested with Google Chrome 11.0.696.68, Firefox 3.6.17, Firefox 4.0.1 and Internet Explorer 8.0.7600.1685. [1] http://code.google.com/p/google-web-toolkit/issues/detail?id=5558 Bug: issue 946 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com> Change-Id: Ia61ba2fbd150e1c587d7c40252d500e28a99711b
This commit is contained in:
@@ -58,7 +58,7 @@ class UsernameField extends Composite {
|
||||
userNameTxt.addKeyPressHandler(new KeyPressHandler() {
|
||||
@Override
|
||||
public void onKeyPress(KeyPressEvent event) {
|
||||
if (event.getCharCode() == KeyCodes.KEY_ENTER) {
|
||||
if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
|
||||
doSetUserName();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user