Mobile megaMenu & Menubar
parent
c493f0d22a
commit
0304b36348
|
@ -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);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -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 })"
|
||||
|
|
Loading…
Reference in New Issue