Fixed #5316 - MenuBar: Pressing Escape-Key in submenu moves focus to first menuitem
parent
68741f54d5
commit
2a512606d5
|
@ -417,8 +417,12 @@ export default {
|
||||||
this.onEnterKey(event);
|
this.onEnterKey(event);
|
||||||
},
|
},
|
||||||
onEscapeKey(event) {
|
onEscapeKey(event) {
|
||||||
this.hide(event, true);
|
if (this.focusedItemInfo.level !== 0) {
|
||||||
this.focusedItemInfo.index = this.findFirstFocusedItemIndex();
|
const _focusedItemInfo = this.focusedItemInfo;
|
||||||
|
|
||||||
|
this.hide(event, false);
|
||||||
|
this.focusedItemInfo = { index: Number(_focusedItemInfo.parentKey[0]), level: 0, parentKey: '' };
|
||||||
|
}
|
||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue