Skip to content

Commit ad214bc

Browse files
committed
fix(NcAppNavigationItem): tabbing on editable items
1 parent 5c3b07f commit ad214bc

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

src/components/NcAppNavigationItem/NcAppNavigationItem.vue

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -791,16 +791,20 @@ export default {
791791
* @param {Event} e the keydown event
792792
*/
793793
handleTab(e) {
794-
// If there is no actions menu, do nothing.
795-
if (!this.$refs.actions) {
794+
if (this.editingActive) {
796795
return
797796
}
798-
if (this.focused) {
797+
798+
const actionsContainer = this.$el?.querySelector('.app-navigation-entry__utils')
799+
if (!actionsContainer) {
800+
return
801+
}
802+
803+
const focusableElement = actionsContainer.querySelector('button')
804+
if (this.focused && focusableElement) {
799805
e.preventDefault()
800-
this.$refs.actions.$refs.triggerButton.$el.focus()
806+
focusableElement.focus()
801807
this.focused = false
802-
} else {
803-
this.$refs.actions.$refs.triggerButton.$el.blur()
804808
}
805809
},
806810

0 commit comments

Comments
 (0)