Merge pull request #5323 from primefaces/issue-5316
MenuBar: Pressing Escape-Key in submenu moves focus to …pull/5339/head
commit
559bf63186
|
@ -417,8 +417,12 @@ export default {
|
|||
this.onEnterKey(event);
|
||||
},
|
||||
onEscapeKey(event) {
|
||||
this.hide(event, true);
|
||||
this.focusedItemInfo.index = this.findFirstFocusedItemIndex();
|
||||
if (this.focusedItemInfo.level !== 0) {
|
||||
const _focusedItemInfo = this.focusedItemInfo;
|
||||
|
||||
this.hide(event, false);
|
||||
this.focusedItemInfo = { index: Number(_focusedItemInfo.parentKey.split('_')[0]), level: 0, parentKey: '' };
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue