Mobile megaMenu & Menubar

pull/5701/head
tugcekucukoglu 2024-05-08 10:56:47 +03:00
parent c493f0d22a
commit 0304b36348
3 changed files with 4 additions and 11 deletions

View File

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

View File

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

View File

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