Unified · Split
| @@ -88,7 +88,7 @@ app.templates.helpPage = """ · 87 unmodified lines | |||
| 88 | <dd class="_shortcuts-dd">Search on Google | 88 | <dd class="_shortcuts-dd">Search on Google |
| 89 | <dt class="_shortcuts-dt"> | 89 | <dt class="_shortcuts-dt"> |
| 90 | <code class="_shortcut-code">escape</code> | 90 | <code class="_shortcut-code">escape</code> |
| 91 | <dd class="_shortcuts-dd">Reset | 91 | <dd class="_shortcuts-dd">Reset<br>(press twice in single doc mode) |
| 92 | <dt class="_shortcuts-dt"> | 92 | <dt class="_shortcuts-dt"> |
| 93 | <code class="_shortcut-code">?</code> | 93 | <code class="_shortcut-code">?</code> |
| 94 | <dd class="_shortcuts-dd">Show this page | 94 | <dd class="_shortcuts-dd">Show this page |
| @@ -24,7 +24,12 @@ class app.views.Document extends app.View · 23 unmodified lines | |||
| 24 | app.router.show '/help#shortcuts' | 24 | app.router.show '/help#shortcuts' |
| 25 | 25 | ||
| 26 | onEscape: -> | 26 | onEscape: -> |
| 27 | app.router.show if app.isSingleDoc() then app.doc.fullPath() else '/' | 27 | path = if !app.isSingleDoc() or location.pathname is app.doc.fullPath() |
| 28 | '/' | ||
| 29 | else | ||
| 30 | app.doc.fullPath() | ||
| 31 | |||
| 32 | app.router.show(path) | ||
| 28 | 33 | ||
| 29 | onBack: -> | 34 | onBack: -> |
| 30 | history.back() | 35 | history.back() |