Brett10
(Brett Sutton)
1
The api method submit.addClickShortcut();
has been removed from 14.
It now appears that we need to add individual key press listeners to each text field.
This should be listed as a breaking change.
e.g.
Button btnLogin = new Button("Login");
btnLogin.addClickShortcut(Key.ENTER);
becomes
usernameField.addKeyPressListener(Key.ENTER, (e) -> login());
passwordField.addKeyPressListener(Key.ENTER, (e) -> login());
Brett10
(Brett Sutton)
2
Further I can’t find anyway to add a key listener to a form which means I need to added it to every field in the form.
Pekka3
(Pekka Hyvönen)
3
The method has not been removed in 14. Your project has something funky going on ? We are not able to see how to reproduce this.
Leif
(Leif Åstrand)
4
That method is inherited from [ClickNotifier]
(https://github.com/vaadin/flow/blob/2.0.0.rc2/flow-server/src/main/java/com/vaadin/flow/component/ClickNotifier.java#L80) that hasn’t had any changes since Vaadin 13 when that method was introduced.
Brett10
(Brett Sutton)
5
sorry, it was a gradle dependancy issues. I managed to pull in a 10.x version of vaadin as well as 14.x hence the reversion.