diff options
Diffstat (limited to 'pages/help_dialog.coffee')
| -rw-r--r-- | pages/help_dialog.coffee | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pages/help_dialog.coffee b/pages/help_dialog.coffee index e16fd5d3..997ea915 100644 --- a/pages/help_dialog.coffee +++ b/pages/help_dialog.coffee @@ -27,11 +27,19 @@ HelpDialog = HelpDialog.toggleAdvancedCommands, false) document.documentElement.addEventListener "click", (event) => - @hide() unless @dialogElement.contains event.target + # 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 , 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 |
