Fixed #5288 - Menu components: track focus with also mousemove

This commit is contained in:
tugcekucukoglu 2024-02-15 18:57:40 +03:00
parent 266d5019af
commit e67efa2d8c
10 changed files with 91 additions and 29 deletions

View file

@ -27,6 +27,7 @@
@keydown="onKeyDown"
@item-click="onItemClick"
@item-mouseenter="onItemMouseEnter"
@item-mousemove="onItemMouseMove"
/>
</div>
</transition>
@ -247,6 +248,11 @@ export default {
onItemMouseEnter(event) {
this.onItemChange(event);
},
onItemMouseMove(event) {
if (this.focused) {
this.changeFocusedItemIndex(event, event.processedItem.index);
}
},
onArrowDownKey(event) {
const itemIndex = this.focusedItemInfo.index !== -1 ? this.findNextItemIndex(this.focusedItemInfo.index) : this.findFirstFocusedItemIndex();