diff options
Diffstat (limited to 'pages')
| -rw-r--r-- | pages/help_dialog.coffee | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/pages/help_dialog.coffee b/pages/help_dialog.coffee index f12b19a3..0e4a8973 100644 --- a/pages/help_dialog.coffee +++ b/pages/help_dialog.coffee @@ -27,19 +27,11 @@ HelpDialog = HelpDialog.toggleAdvancedCommands, false) document.documentElement.addEventListener "click", (event) => - # Normally, we hide the help dialog on "click". On the options page though, we do not. This allows the - # user to view the help page while typing command names into the key mappings input; see #2045. - @hide() unless @isVimiumOptionsPage() or @dialogElement.contains event.target + @hide() unless @dialogElement.contains event.target , false isReady: -> true - isVimiumOptionsPage: -> - try - window.top.isVimiumOptionsPage - catch - false - show: (html) -> for own placeholder, htmlString of html @dialogElement.querySelector("#help-dialog-#{placeholder}").innerHTML = htmlString @@ -86,7 +78,9 @@ HelpDialog = UIComponentServer.registerHandler (event) -> switch event.data.name ? event.data when "frameFocused" - HelpDialog.hide() unless event.data.focusFrameId == frameId + # We normally close when we lose the focus. However, we do not close on the options page. This allows + # users to view the help dialog while typing in the key-mappings input. + HelpDialog.hide() unless event.data.focusFrameId == frameId or try window.top.isVimiumOptionsPage when "hide" HelpDialog.hide() else |
