Skip to content

Commit

Permalink
Fix: search field autofocus is not working
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksey-hoffman committed Aug 7, 2022
1 parent 18cf7e6 commit 066dcda
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/GlobalSearch/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -534,9 +534,11 @@ export default {
this.cancelSearchAllDrives()
}
},
widget (newValue, oldValue) {
widget (newValue) {
if (newValue && this.$refs.globalSearchInput) {
this.$refs.globalSearchInput.focus()
this.$nextTick(() => {
this.$refs.globalSearchInput.focus()
})
}
else {
this.cancelSearchAllDrives()
Expand Down

0 comments on commit 066dcda

Please sign in to comment.