History

Don't capture space-key events when typing, to allow using space characters in the search

Thibaut committed 11 years ago

Commit bbf62921 parent 499b7d91 file · +5 −2Browse files

Unified · Split

assets/javascripts/app/shortcuts.coffee+5−2
@@ -47,8 +47,9 @@ class app.Shortcuts · 46 unmodified lines
4747 when 27
4848 @trigger 'escape'
4949 when 32
50− @trigger 'pageDown'
51− false
50+ if not @lastKeypress or @lastKeypress < Date.now() - 1000
51+ @trigger 'pageDown'
52+ false
5253 when 33
5354 @trigger 'pageUp'
5455 when 34
@@ -127,3 +128,5 @@ class app.Shortcuts · 72 unmodified lines
127128 if event.which is 63 and not event.target.value
128129 @trigger 'help'
129130 false
131+ else
132+ @lastKeypress = Date.now()