History

Add forward slash as keyboard shortcut to focus the search field

Closes #542.

Thibaut Courouble committed 9 years ago

Commit 06cf1181 parent bd2224b2 files · +5 −1Browse files

Unified · Split

2 files
  1. assets/javascripts/app/shortcuts.coffee +4 −0
  2. assets/javascripts/templates/pages/help_tmpl.coffee +1 −1
assets/javascripts/app/shortcuts.coffee+4−0
@@ -76,6 +76,10 @@ class app.Shortcuts · 75 unmodified lines
7676 @trigger 'down'
7777 @showTip?()
7878 false
79+ when 191
80+ unless event.target.form
81+ @trigger 'typing'
82+ false
7983
8084 handleKeydownSuperEvent: (event) ->
8185 switch event.which
assets/javascripts/templates/pages/help_tmpl.coffee+1−1
@@ -107,7 +107,7 @@ app.templates.helpPage = """ · 106 unmodified lines
107107 <dd class="_shortcuts-dd">Show this page
108108 </dl>
109109 <p class="_note">
110− <strong>Tip:</strong> If the cursor is no longer in the search field, press backspace or
110+ <strong>Tip:</strong> If the cursor is no longer in the search field, press <code class="_label">/</code> or
111111 continue to type and it will refocus the search field and start showing new results.
112112
113113 <h2 class="_lined-heading" id="abbreviations">Abbreviations</h2>