diff --git a/browser/base/content/browser-sets.inc b/browser/base/content/browser-sets.inc index d3d9748d2a1f..3a38346bd605 100644 --- a/browser/base/content/browser-sets.inc +++ b/browser/base/content/browser-sets.inc @@ -196,7 +196,7 @@ key="&newNavigatorCmd.key;" command="cmd_newNavigator" modifiers="accel"/> - + #ifndef XP_MACOSX diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 4e6b8bbe9500..4bd0c82e94f4 100755 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -979,7 +979,6 @@ var gBrowserInit = { // adjust browser UI for popups gURLBar.setAttribute("readonly", "true"); gURLBar.setAttribute("enablehistory", "false"); - goSetCommandEnabled("cmd_newNavigatorTab", false); } // Misc. inits. @@ -1901,16 +1900,8 @@ function BrowserOpenTab(event) { case "tab": case "tabshifted": // When accel-click or middle-click are used, open the new tab as - // related to the current tab. We need to exclude key events here, - // where the accel key is required for the shortcut. - // 'event' and its sourceEvent are command events, the latter of which - // doesn't have its own sourceEvent. These events don't indicate how - // they were invoked, except that the sourceEvent for keyboard - // shortcuts have targets, and those for clicking a toolbar - // button or activating a menu item have that button or menuitem as - // their target. - relatedToCurrent = !event.sourceEvent || - event.sourceEvent.target.localName != "key"; + // related to the current tab. + relatedToCurrent = true; break; case "current": where = "tab"; diff --git a/browser/base/content/test/general/browser_popupUI.js b/browser/base/content/test/general/browser_popupUI.js index 55c9d45fec4f..2476beb6c7cc 100644 --- a/browser/base/content/test/general/browser_popupUI.js +++ b/browser/base/content/test/general/browser_popupUI.js @@ -44,6 +44,8 @@ function testPopupUI(win) { EventUtils.synthesizeKey("t", { accelKey: true }, win); is(win.gBrowser.browsers.length, 1, "Accel+T doesn't open a new tab in the popup"); + is(gBrowser.browsers.length, 2, "Accel+T opened a new tab in the parent window"); + gBrowser.removeCurrentTab(); EventUtils.synthesizeKey("w", { accelKey: true }, win); ok(win.closed, "Accel+W closes the popup");