aboutsummaryrefslogtreecommitdiffstats
path: root/pages
diff options
context:
space:
mode:
Diffstat (limited to 'pages')
-rw-r--r--pages/help_dialog.coffee8
-rw-r--r--pages/options.coffee3
2 files changed, 4 insertions, 7 deletions
diff --git a/pages/help_dialog.coffee b/pages/help_dialog.coffee
index 990fa063..b2d33f95 100644
--- a/pages/help_dialog.coffee
+++ b/pages/help_dialog.coffee
@@ -1,9 +1,5 @@
-# This overrides the HelpDialog implementation in vimium_frontend.coffee, which prevents us from being able
-# to spawn a help dialog within the help dialog UIComponent. As such, we need to provide all the properties
-# that we expect on the normal HelpDialog implementation.
-#
-# NOTE(mrmr1993): In the future, we can move to a single help dialog UIComponent per tab (ie. in the
-# top-level frame), and then we don't need to be concerned about nested help dialog frames.
+# This overrides the HelpDialog implementation in vimium_frontend.coffee. We provide aliases for the two
+# HelpDialog methods required by normalMode (isShowing() and toggle()).
HelpDialog =
dialogElement: null
isShowing: -> true
diff --git a/pages/options.coffee b/pages/options.coffee
index 3487c52f..883405e6 100644
--- a/pages/options.coffee
+++ b/pages/options.coffee
@@ -235,7 +235,8 @@ initOptionsPage = ->
activateHelpDialog = ->
request = showUnboundCommands: true, showCommandNames: true, customTitle: "Command Listing"
- chrome.runtime.sendMessage extend(request, handler: "getHelpDialogHtml"), HelpDialog.toggle.bind HelpDialog
+ chrome.runtime.sendMessage extend(request, handler: "getHelpDialogHtml"), (response) ->
+ HelpDialog.toggle {html: response}
saveOptions = ->
Option.saveOptions()