bug 341097: Ctrl-W doesn't close window when tab bar is hidden in a script opened window, patch by Simon B�nzli <zeniko@gmail.com>, r=mconnor

This commit is contained in:
gavin%gavinsharp.com 2006-06-17 21:51:09 +00:00
parent 55e376cb2a
commit 8828dbe83d

View File

@ -1866,7 +1866,8 @@ function BrowserCloseTabOrWindow()
}
#endif
if (gBrowser.localName == "tabbrowser" && (gBrowser.tabContainer.childNodes.length > 1 || !gPrefService.getBoolPref("browser.tabs.autoHide"))) {
if (gBrowser.localName == "tabbrowser" && (gBrowser.tabContainer.childNodes.length > 1 ||
!gPrefService.getBoolPref("browser.tabs.autoHide") && window.toolbar.visible)) {
// Just close up a tab.
gBrowser.removeCurrentTab();
return;