diff options
| author | Stephen Blott | 2016-05-07 04:37:36 +0100 |
|---|---|---|
| committer | Stephen Blott | 2016-05-07 04:37:36 +0100 |
| commit | d00cc696c8e43b1b0298bce61fa18e22d78f270d (patch) | |
| tree | 0ca8c762ee6671ed4db43b0b45ba84f8f44e0e56 /content_scripts/vimium_frontend.coffee | |
| parent | 62a3a7bb3568c3312abe693c267093994d143d4a (diff) | |
| parent | f83e99fd42a4cf412c79fb15c58f59c105c25723 (diff) | |
| download | vimium-d00cc696c8e43b1b0298bce61fa18e22d78f270d.tar.bz2 | |
Merge pull request #2118 from smblott-github/fix-ui-component-init-issues
Fix UI-component initialization issues (maybe).
Diffstat (limited to 'content_scripts/vimium_frontend.coffee')
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 9dd68278..07322250 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -143,7 +143,7 @@ initializeOnEnabledStateKnown = (isEnabledForUrl) -> if isEnabledForUrl # We only initialize (and activate) the Vomnibar in the top frame. Also, we do not initialize the # Vomnibar until we know that Vimium is enabled. Thereafter, there's no more initialization to do. - Vomnibar.init() if DomUtils.isTopFrame() + DomUtils.documentComplete Vomnibar.init.bind Vomnibar if DomUtils.isTopFrame() initializeOnEnabledStateKnown = -> # @@ -637,10 +637,11 @@ window.HelpDialog ?= abort: -> @helpUI.hide false if @isShowing() toggle: (request) -> - @helpUI ?= new UIComponent "pages/help_dialog.html", "vimiumHelpDialogFrame", -> - if @isShowing() + DomUtils.documentComplete => + @helpUI ?= new UIComponent "pages/help_dialog.html", "vimiumHelpDialogFrame", -> + if @helpUI? and @isShowing() @helpUI.hide() - else + else if @helpUI? @helpUI.activate extend request, name: "activate", focus: true |
