NativeButton KeyCode.Enter

Hallo,

i am using a nativebutton to login to my application. it would be nice to “click” the button by using the Enter Key of the keyboard.
If i use a Button it works with a ClickShortcutListener. With NativeButtons it doesn’t work.

 NativeButton loginButton = new NativeButton(GeneralMessageResolver.getString(GeneralMessageKeys.LOGIN));
        loginButton.addClickListener(controller.getButtonClickListener());
        loginButton.setClickShortcut(KeyCode.ENTER);

Is it a bug?

Greetz,
Michel

Hi,

On the client side it looks like

VNativeButton

doesn’t implement

ShortcutActionTarget

. I guess it is not a bug, the component just doesn’t support it. But anyway - you could file a ticket for this issue.

HTH,
Aleksandr.

HI

i’m using Vaadin 6.7.6. For me it works fine as you described.