pull/5701/head
Cagatay Civici 2024-05-08 12:42:24 +03:00
commit ab4acd527f
3 changed files with 4 additions and 11 deletions

View File

@ -289,12 +289,7 @@ export default {
if (grouped) { if (grouped) {
this.onItemChange(event); this.onItemChange(event);
} else { } else {
const rootProcessedItem = root ? processedItem : this.activeItem;
this.hide(originalEvent); this.hide(originalEvent);
this.changeFocusedItemInfo(originalEvent, rootProcessedItem ? rootProcessedItem.index : -1);
this.mobileActive = false;
DomHandler.focus(this.menubar);
} }
} }
}, },

View File

@ -27,7 +27,7 @@
</slot> </slot>
<MenubarSub <MenubarSub
:ref="menubarRef" :ref="menubarRef"
:id="id" :id="id + '_list'"
role="menubar" role="menubar"
:items="processedItems" :items="processedItems"
:templates="$slots" :templates="$slots"
@ -173,10 +173,7 @@ export default {
}, },
onFocus(event) { onFocus(event) {
this.focused = true; this.focused = true;
this.focusedItemInfo = this.focusedItemInfo.index !== -1 ? this.focusedItemInfo : { index: this.findFirstFocusedItemIndex(), level: 0, parentKey: '' };
if (!this.popup) {
this.focusedItemInfo = this.focusedItemInfo.index !== -1 ? this.focusedItemInfo : { index: this.findFirstFocusedItemIndex(), level: 0, parentKey: '' };
}
this.$emit('focus', event); this.$emit('focus', event);
}, },
@ -294,7 +291,7 @@ export default {
} }
}, },
onItemMouseEnter(event) { onItemMouseEnter(event) {
if (!this.mobileActive && this.dirty) { if (this.dirty) {
this.onItemChange(event); this.onItemChange(event);
} }
}, },

View File

@ -41,6 +41,7 @@
</div> </div>
<MenubarSub <MenubarSub
v-if="isItemVisible(processedItem) && isItemGroup(processedItem)" v-if="isItemVisible(processedItem) && isItemGroup(processedItem)"
:id="getItemId(processedItem) + '_list'"
:menuId="menuId" :menuId="menuId"
role="menu" role="menu"
:style="sx('submenu', true, { processedItem })" :style="sx('submenu', true, { processedItem })"