Fixed issue #530 - Keyboard shortcuts dialog breaks url bar navigation.

This commit is contained in:
Martin Edenhofer 2017-01-13 20:19:51 +01:00
parent d6763a1086
commit d05b489be0

View file

@ -19,6 +19,10 @@ class App.KeyboardShortcutModal extends App.ControllerModal
return true if @el.parents('html').length > 0 return true if @el.parents('html').length > 0
false false
onClosed: ->
return if window.location.hash isnt '#keyboard_shortcuts'
window.history.back()
class App.KeyboardShortcutWidget extends Spine.Module class App.KeyboardShortcutWidget extends Spine.Module
@include App.LogInclude @include App.LogInclude
@ -143,6 +147,9 @@ App.Config.set(
description: 'List of shortcuts' description: 'List of shortcuts'
globalEvent: 'list-of-shortcuts' globalEvent: 'list-of-shortcuts'
callback: => callback: =>
if window.location.hash is '#keyboard_shortcuts'
App.Event.trigger('keyboard_shortcuts_close')
return
if @dialog && @dialog.exists() if @dialog && @dialog.exists()
@dialog.close() @dialog.close()
@dialog = false @dialog = false