mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2025-02-18 00:02:02 +03:00
perf(search): autofocus and / shortcut to open search (#949)
* search autofocus and / shortcut to open search * search autofocus and / shortcut to open search
This commit is contained in:
parent
3f39a2b06b
commit
b2edc3274d
2 changed files with 5 additions and 0 deletions
|
@ -12,6 +12,7 @@
|
|||
:rules="[v => !!v || 'Search term is required']"
|
||||
label="Search pattern"
|
||||
@keydown.enter.prevent="runNewSearch"
|
||||
autofocus
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="6" sm="5" md="2">
|
||||
|
|
|
@ -473,6 +473,10 @@ export default {
|
|||
|
||||
return this.createModal('ConfirmDeleteModal')
|
||||
}
|
||||
|
||||
// 'Search' => Search view
|
||||
if (e.key === "/" && this.$route.name !== 'search' && document.activeElement !== document.getElementById('searchInput'))
|
||||
this.$router.push({ name: 'search' })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue