mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2024-11-25 02:45:48 +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
|
||||
if (e.keyCode === 70 && doesCommand(e)) {
|
||||
e.preventDefault()
|
||||
|
||||
this.searchFilterEnabled = true
|
||||
document.getElementById('searchInput').focus()
|
||||
const searchInput = document.getElementById('searchInput')
|
||||
if (document.activeElement !== searchInput) {
|
||||
e.preventDefault()
|
||||
this.searchFilterEnabled = true
|
||||
searchInput.focus()
|
||||
}
|
||||
}
|
||||
|
||||
// 'Escape' => Remove focus from search field
|
||||
|
|
Loading…
Reference in a new issue