Correct enter key detection in project creation screen
Detecting enter key press with `getCharCode()` does not work properly in all browsers, for example Firefox. Instead, `getNativeEvent().getKeyCode()` should be used. Change-Id: Ib94c8af93ab67d5a8fd62c9c25b6d5ea83de7017
This commit is contained in:
committed by
David Pursehouse
parent
1c830c11e7
commit
adcfdfd263
@@ -132,7 +132,7 @@ public class CreateProjectScreen extends Screen {
|
||||
project.addKeyPressHandler(new KeyPressHandler() {
|
||||
@Override
|
||||
public void onKeyPress(KeyPressEvent event) {
|
||||
if (event.getCharCode() == KeyCodes.KEY_ENTER) {
|
||||
if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
|
||||
doCreateProject();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user