Mobile behavior changes

pull/6596/head
tugcekucukoglu 2024-10-16 12:08:07 +03:00
parent d498096fbc
commit 502d3cf3d9
1 changed files with 8 additions and 3 deletions

View File

@ -248,7 +248,7 @@ export default {
break; break;
} }
}, },
onItemChange(event) { onItemChange(event, type) {
const { processedItem, isFocus } = event; const { processedItem, isFocus } = event;
if (isEmpty(processedItem)) return; if (isEmpty(processedItem)) return;
@ -260,10 +260,15 @@ export default {
grouped && activeItemPath.push(processedItem); grouped && activeItemPath.push(processedItem);
this.focusedItemInfo = { index, level, parentKey }; this.focusedItemInfo = { index, level, parentKey };
this.activeItemPath = activeItemPath;
grouped && (this.dirty = true); grouped && (this.dirty = true);
isFocus && focus(this.menubar); isFocus && focus(this.menubar);
if (type === 'hover' && this.queryMatches) {
return;
}
this.activeItemPath = activeItemPath;
}, },
onItemClick(event) { onItemClick(event) {
const { originalEvent, processedItem } = event; const { originalEvent, processedItem } = event;
@ -295,7 +300,7 @@ export default {
}, },
onItemMouseEnter(event) { onItemMouseEnter(event) {
if (this.dirty) { if (this.dirty) {
this.onItemChange(event); this.onItemChange(event, 'hover');
} }
}, },
onItemMouseMove(event) { onItemMouseMove(event) {