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) {