mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Fixed #5327 - TieredMenu: Pressing Escape-Key in submenu moves focus to first menuitem
This commit is contained in:
parent
9ae9dd82b4
commit
1a68c7144e
1 changed files with 6 additions and 2 deletions
|
@ -380,8 +380,12 @@ export default {
|
|||
this.onEnterKey(event);
|
||||
},
|
||||
onEscapeKey(event) {
|
||||
this.hide(event, true);
|
||||
!this.popup && (this.focusedItemInfo.index = this.findFirstFocusedItemIndex());
|
||||
if (this.focusedItemInfo.level !== 0) {
|
||||
const _focusedItemInfo = this.focusedItemInfo;
|
||||
|
||||
this.hide(event, false);
|
||||
!this.popup && (this.focusedItemInfo = { index: Number(_focusedItemInfo.parentKey.split('_')[0]), level: 0, parentKey: '' });
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue