diff --git a/src/assets/action.scss b/src/assets/action.scss index 5fd8488461..37b2ac1296 100644 --- a/src/assets/action.scss +++ b/src/assets/action.scss @@ -5,11 +5,15 @@ @mixin action-active { li.action { + &:hover, &.active { - background-color: var(--color-background-hover); border-radius: 6px; padding: 0; } + + &:hover { + background-color: var(--color-background-hover); + } } } diff --git a/src/components/NcActions/NcActions.vue b/src/components/NcActions/NcActions.vue index dabad14826..6cb27f4e31 100644 --- a/src/components/NcActions/NcActions.vue +++ b/src/components/NcActions/NcActions.vue @@ -1525,31 +1525,6 @@ export default { getFocusableMenuItemElements() { return this.$refs.menu.querySelectorAll(focusableSelector) }, - /** - * Focus nearest focusable item on mouse move. - * DO NOT change the focus if the target is already focused - * this will prevent issues with input being unfocused - * on mouse move - * @param {PointerEvent} event - The mouse move event - */ - onMouseFocusAction(event) { - if (document.activeElement === event.target) { - return - } - - const menuItem = event.target.closest('li') - if (menuItem && this.$refs.menu.contains(menuItem)) { - const focusableItem = menuItem.querySelector(focusableSelector) - if (focusableItem) { - const focusList = this.getFocusableMenuItemElements() - const focusIndex = [...focusList].indexOf(focusableItem) - if (focusIndex > -1) { - this.focusIndex = focusIndex - this.focusAction() - } - } - } - }, /** * Dispatches the keydown listener to different handlers * @@ -1969,7 +1944,6 @@ export default { }, on: { keydown: this.onKeydown, - mousemove: this.onMouseFocusAction, }, ref: 'menu', }, [