Skip to content

Commit

Permalink
fix: add hasfocus to ensure input is tabbable
Browse files Browse the repository at this point in the history
  • Loading branch information
alastair-simon committed Dec 19, 2024
1 parent 850421e commit 4b54b66
Showing 1 changed file with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@
:disabled="disabled"
:readonly="readonly"
@click="onClickInput"
@keyup.tab="toggleFocusClass"
@keyup.enter="toggleColorPicker"
@keyup.escape="outsideClick"
@focus="hasFocus = true"
@blur="hasFocus = false"
/>

<mt-floating-ui
Expand Down Expand Up @@ -1300,14 +1301,6 @@ export default defineComponent({
this.toggleColorPicker();
},
toggleFocusClass() {
if (this.hasFocus) {
this.removeFocusClass();
}
this.setFocusClass();
console.log(this.hasFocus)
},
setFocusClass() {
this.hasFocus = true;
},
Expand Down

0 comments on commit 4b54b66

Please sign in to comment.