diff options
| author | Stephen Blott | 2016-04-17 16:51:55 +0100 |
|---|---|---|
| committer | Stephen Blott | 2016-04-17 16:51:55 +0100 |
| commit | c01d7eea8675f9a7d84999777e8de72244d687b6 (patch) | |
| tree | 5a76f087567dd05aca4fe2adf69090398e62e9a0 /content_scripts/vomnibar.coffee | |
| parent | 44ddab1e1eca01ae6c958756d149be2d4128b290 (diff) | |
| download | vimium-c01d7eea8675f9a7d84999777e8de72244d687b6.tar.bz2 | |
UI-compnent commands must wait for the document to be ready.
Diffstat (limited to 'content_scripts/vomnibar.coffee')
| -rw-r--r-- | content_scripts/vomnibar.coffee | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/content_scripts/vomnibar.coffee b/content_scripts/vomnibar.coffee index cbd2892c..292cedc7 100644 --- a/content_scripts/vomnibar.coffee +++ b/content_scripts/vomnibar.coffee @@ -56,10 +56,11 @@ Vomnibar = # selectFirst - Optional, boolean. Whether to select the first entry. # newTab - Optional, boolean. Whether to open the result in a new tab. open: (sourceFrameId, options) -> - @init() - # The Vomnibar cannot coexist with the help dialog (it causes focus issues). - HelpDialog.abort() - @vomnibarUI.activate extend options, { name: "activate", sourceFrameId, focus: true } + DomUtils.ifDocumentIsReady => + @init() + # The Vomnibar cannot coexist with the help dialog (it causes focus issues). + HelpDialog.abort() + @vomnibarUI.activate extend options, { name: "activate", sourceFrameId, focus: true } root = exports ? window root.Vomnibar = Vomnibar |
