From d05b489be01829fde14d1d70f1d4cbb733289ff9 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 13 Jan 2017 20:19:51 +0100 Subject: [PATCH] Fixed issue #530 - Keyboard shortcuts dialog breaks url bar navigation. --- .../app/controllers/widget/keyboard_shortcuts.coffee | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/assets/javascripts/app/controllers/widget/keyboard_shortcuts.coffee b/app/assets/javascripts/app/controllers/widget/keyboard_shortcuts.coffee index ea099f8ce..7d07e6f38 100644 --- a/app/assets/javascripts/app/controllers/widget/keyboard_shortcuts.coffee +++ b/app/assets/javascripts/app/controllers/widget/keyboard_shortcuts.coffee @@ -19,6 +19,10 @@ class App.KeyboardShortcutModal extends App.ControllerModal return true if @el.parents('html').length > 0 false + onClosed: -> + return if window.location.hash isnt '#keyboard_shortcuts' + window.history.back() + class App.KeyboardShortcutWidget extends Spine.Module @include App.LogInclude @@ -143,6 +147,9 @@ App.Config.set( description: 'List of shortcuts' globalEvent: 'list-of-shortcuts' callback: => + if window.location.hash is '#keyboard_shortcuts' + App.Event.trigger('keyboard_shortcuts_close') + return if @dialog && @dialog.exists() @dialog.close() @dialog = false