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
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