mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2024-11-28 21:18:54 +03:00
perf: Allow native find (#864)
This commit is contained in:
parent
fe1f962c33
commit
7221a3db4f
1 changed files with 6 additions and 4 deletions
|
@ -450,10 +450,12 @@ export default {
|
||||||
|
|
||||||
// 'ctrl + F' => Focus search filter field
|
// 'ctrl + F' => Focus search filter field
|
||||||
if (e.keyCode === 70 && doesCommand(e)) {
|
if (e.keyCode === 70 && doesCommand(e)) {
|
||||||
e.preventDefault()
|
const searchInput = document.getElementById('searchInput')
|
||||||
|
if (document.activeElement !== searchInput) {
|
||||||
this.searchFilterEnabled = true
|
e.preventDefault()
|
||||||
document.getElementById('searchInput').focus()
|
this.searchFilterEnabled = true
|
||||||
|
searchInput.focus()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 'Escape' => Remove focus from search field
|
// 'Escape' => Remove focus from search field
|
||||||
|
|
Loading…
Reference in a new issue