diff options
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 2 | ||||
| -rw-r--r-- | content_scripts/vomnibar.coffee | 3 | ||||
| -rw-r--r-- | tests/dom_tests/vomnibar_test.coffee | 2 | 
3 files changed, 5 insertions, 2 deletions
| diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 39e87648..f36b3e8c 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -635,7 +635,7 @@ window.HelpDialog ?=      @helpUI = new UIComponent "pages/help_dialog.html", "vimiumHelpDialogFrame", (event) =>        @hide() if event.data == "hide" -  isReady: -> @helpUI? +  isReady: -> @helpUI?.uiComponentIsReady    show: (html) ->      @init() diff --git a/content_scripts/vomnibar.coffee b/content_scripts/vomnibar.coffee index a19a9b70..c23a4e6f 100644 --- a/content_scripts/vomnibar.coffee +++ b/content_scripts/vomnibar.coffee @@ -64,7 +64,8 @@ Vomnibar =    #   newTab      - Optional, boolean. Whether to open the result in a new tab.    open: (sourceFrameId, options) ->      @init() -    @vomnibarUI.activate extend options, { sourceFrameId } +    if @vomnibarUI?.uiComponentIsReady +      @vomnibarUI.activate extend options, { sourceFrameId }  root = exports ? window  root.Vomnibar = Vomnibar diff --git a/tests/dom_tests/vomnibar_test.coffee b/tests/dom_tests/vomnibar_test.coffee index 0898e33a..c5974a4c 100644 --- a/tests/dom_tests/vomnibar_test.coffee +++ b/tests/dom_tests/vomnibar_test.coffee @@ -25,6 +25,8 @@ context "Keep selection within bounds",      stub vomnibarFrame.UIComponentServer, "postMessage", (data) ->        UIComponent.handleMessage {data} +    stub Vomnibar.vomnibarUI, "uiComponentIsReady", true +    tearDown ->      Vomnibar.vomnibarUI.hide() | 
