From 502d3cf3d9b343d6e445917971536caf0aca884a Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Wed, 16 Oct 2024 12:08:07 +0300 Subject: [PATCH] Mobile behavior changes --- packages/primevue/src/menubar/Menubar.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/primevue/src/menubar/Menubar.vue b/packages/primevue/src/menubar/Menubar.vue index 47fa2bd13..66daad08c 100755 --- a/packages/primevue/src/menubar/Menubar.vue +++ b/packages/primevue/src/menubar/Menubar.vue @@ -248,7 +248,7 @@ export default { break; } }, - onItemChange(event) { + onItemChange(event, type) { const { processedItem, isFocus } = event; if (isEmpty(processedItem)) return; @@ -260,10 +260,15 @@ export default { grouped && activeItemPath.push(processedItem); this.focusedItemInfo = { index, level, parentKey }; - this.activeItemPath = activeItemPath; grouped && (this.dirty = true); isFocus && focus(this.menubar); + + if (type === 'hover' && this.queryMatches) { + return; + } + + this.activeItemPath = activeItemPath; }, onItemClick(event) { const { originalEvent, processedItem } = event; @@ -295,7 +300,7 @@ export default { }, onItemMouseEnter(event) { if (this.dirty) { - this.onItemChange(event); + this.onItemChange(event, 'hover'); } }, onItemMouseMove(event) {