From 8f4411f9afdaddb2736b668070fda0cbc476eaa0 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Fri, 31 Dec 2010 13:21:22 -0500 Subject: [PATCH] Open new windows properly in dactyl.open(). Closes issue #222. --HG-- extra : rebase_source : 20823b8a8742598416b321c091f67efd6da98aa4 --- common/content/dactyl.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/content/dactyl.js b/common/content/dactyl.js index ea558466..c00bac1c 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -1040,8 +1040,9 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { }); case dactyl.NEW_WINDOW: - window.open(); - let win = services.windowMediator.getMostRecentWindow("navigator:browser"); + var handler = Cc['@mozilla.org/browser/clh;1'].getService(Ci.nsIBrowserHandler); + let win = window.openDialog(document.documentURI, "_blank", "chrome,all,dialog=no", + handler.defaultArgs); win.loadURI(url, null, postdata); browser = win.getBrowser(); return win.content;