Vaadin 14 Button.addClickShortcut gone

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.


	Button btnLogin = new Button("Login");


		usernameField.addKeyPressListener(Key.ENTER, (e) -> login());
		passwordField.addKeyPressListener(Key.ENTER, (e) -> login());

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.

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.

That method is inherited from [ClickNotifier]
( that hasn’t had any changes since Vaadin 13 when that method was introduced.

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.