Fix key handling in AppView
- Now offering to menu if it has focus so that it can do its things. Essentially if menu is visible it take keys. - Relates #807
This commit is contained in:
@@ -107,6 +107,11 @@ public class AppView extends BoxView {
|
||||
}
|
||||
return KeyHandler.resultOf(event, consumed, null);
|
||||
};
|
||||
|
||||
// if menu has focus, take from there
|
||||
if (menu != null && menu.hasFocus()) {
|
||||
return menu.getKeyHandler();
|
||||
}
|
||||
KeyHandler otherHandler = main != null ? main.getKeyHandler() : super.getKeyHandler();
|
||||
return otherHandler.thenIfNotConsumed(handler);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user