perf: Allow native find (#864)

This commit is contained in:
Rémi Marseault 2023-06-15 14:04:03 +02:00 committed by GitHub
parent fe1f962c33
commit 7221a3db4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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