Changed search hotkey to F

This commit is contained in:
Eduard Urbach 2017-06-24 16:41:22 +02:00
parent 4dfb14904a
commit 873be1849f
2 changed files with 8 additions and 1 deletions

View File

@ -39,7 +39,7 @@ component LoggedInMenu(user *arn.User)
NavigationButtonNoAJAX("Logout", "/logout", "sign-out")
component FuzzySearch
input#search.action(data-action="search", data-trigger="input", type="text", placeholder="Search...", title="Shortcut: Ctrl + Q")
input#search.action(data-action="search", data-trigger="input", type="text", placeholder="Search...", title="Shortcut: F")
component NavigationButton(name string, target string, icon string)
a.navigation-link.ajax(href=target, aria-label=name, title=name)

View File

@ -158,6 +158,13 @@ export class AnimeNotifier {
}
onKeyDown(e: KeyboardEvent) {
// Ignore hotkeys on input elements
switch(document.activeElement.tagName) {
case "INPUT":
case "TEXTAREA":
return
}
// F = Search
if(e.keyCode == 70) {
let search = this.app.find("search") as HTMLInputElement