diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 9bb72e6c..a771d2b9 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -1604,6 +1604,7 @@ const Dactyl = Module("dactyl", { commands.add(["exto[ptions]", "extp[references]"], "Open an extension's preference dialog", function (args) { + let tab = dactyl.forceNewTab; AddonManager.getAddonsByTypes(["extension"], function (list) { list = list.filter(function (extension) extension.name == args[0]); if (!list.length || !list[0].optionsURL) @@ -1611,7 +1612,7 @@ const Dactyl = Module("dactyl", { else if (args.bang) window.openDialog(list[0].optionsURL, "_blank", "chrome"); else - dactyl.open(list[0].optionsURL, { from: "extoptions" }); + dactyl.open(list[0].optionsURL, { from: "extoptions", where: tab && dactyl.NEW_TAB }); }); }, { argCount: "1", diff --git a/common/content/tabs.js b/common/content/tabs.js index d2d16d7c..a03a18e5 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -590,9 +590,14 @@ const Tabs = Module("tabs", { commands.add(["tab"], "Execute a command and tell it to output in a new tab", function (args) { - dactyl.forceNewTab = true; - dactyl.execute(args[0], null, true); - dactyl.forceNewTab = false; + try { + var force = dactyl.forceNewTab; + dactyl.forceNewTab = true; + dactyl.execute(args[0], null, true); + } + finally { + dactyl.forceNewTab = force; + } }, { argCount: "+", completer: function (context) completion.ex(context),