Keyboard shortcut action run in not active screen #PL-2709

This commit is contained in:
Konstantin Devyatkin 2013-09-24 11:34:43 +00:00
parent 080b266c28
commit 919d395f1d

View File

@ -413,10 +413,12 @@ public abstract class WebAbstractTable<T extends com.vaadin.ui.Table & CubaEnhan
component.addShortcutListener(new ShortcutListener("tableEnter", com.vaadin.event.ShortcutAction.KeyCode.ENTER, null) {
@Override
public void handleAction(Object sender, Object target) {
if (enterPressAction != null) {
enterPressAction.actionPerform(WebAbstractTable.this);
} else {
handleClickAction();
if (target == WebAbstractTable.this.component) {
if (enterPressAction != null) {
enterPressAction.actionPerform(WebAbstractTable.this);
} else {
handleClickAction();
}
}
}
});