Skip to content

Commit

Permalink
[full-ci] Keyboard navigation disable for inputs (#7648)
Browse files Browse the repository at this point in the history
* Disable keybinds for input and textarea

* Linting

* Add PR to changelog

* Disable keybinds for input and textarea
  • Loading branch information
lookacat authored Sep 16, 2022
1 parent 7188e9f commit c074c0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog/unreleased/enhancement-make-keybindings-global
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ Enhancement: Make keybindings global
We've made keybindings global and introduced a data-attribute to mark elements that need custom keybindings

https://github.com/owncloud/web/pull/7569
https://github.com/owncloud/web/pull/7648
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ export default defineComponent({
}),
areCustomKeyBindingsEnabled() {
const activeElementTag = document.activeElement.tagName
if (['textarea', 'input', 'select'].includes(activeElementTag.toLowerCase())) return true
const closestSelectionEl = window.getSelection().focusNode as HTMLElement
if (!closestSelectionEl) return false
let customKeyBindings
Expand Down

0 comments on commit c074c0d

Please sign in to comment.