summaryrefslogtreecommitdiff
path: root/common/content
diff options
context:
space:
mode:
authorKris Maglione <maglione.k@gmail.com>2011-01-07 14:59:43 -0500
committerKris Maglione <maglione.k@gmail.com>2011-01-07 14:59:43 -0500
commita0c1089e0896af0613658a17078f5380c9008a3a (patch)
tree3deacd672300db2de63c7c4e14ee19729424784e /common/content
parent7ba2f1657bad06f3f199dfd36de0341ff0d1fdb0 (diff)
downloadpentadactyl-a0c1089e0896af0613658a17078f5380c9008a3a.tar.gz
Fix :wino <url>. Closes issue #... oh, it was only a mailing list post.
Diffstat (limited to 'common/content')
-rw-r--r--common/content/dactyl.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/common/content/dactyl.js b/common/content/dactyl.js
index a01a98b9..c9b8bfa2 100644
--- a/common/content/dactyl.js
+++ b/common/content/dactyl.js
@@ -1020,9 +1020,6 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
// decide where to load the first url
switch (where) {
- case dactyl.CURRENT_TAB:
- browser.loadURIWithFlags(url, flags, null, null, postdata);
- return browser.contentWindow;
case dactyl.NEW_TAB:
if (!dactyl.has("tabs"))
@@ -1035,9 +1032,13 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
case dactyl.NEW_WINDOW:
let win = window.openDialog(document.documentURI, "_blank", "chrome,all,dialog=no");
+ while (win.document.readyState != "complete")
+ util.threadYield();
browser = win.getBrowser();
+ // FALLTHROUGH
+ case dactyl.CURRENT_TAB:
browser.loadURIWithFlags(url, flags, null, null, postdata);
- return win.content;
+ return browser.contentWindow;
}
}
catch (e) {}