Skip to content
This repository has been archived by the owner on Mar 5, 2019. It is now read-only.

Commit

Permalink
Fix the extensions.tabutils.closeLastWindowWithLastTab on Fx31+
Browse files Browse the repository at this point in the history
  • Loading branch information
yfdyh000 committed Feb 17, 2015
1 parent 4782531 commit 546c18e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chrome/content/tabutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,9 @@ tabutils._tabClosingOptions = function() {
TU_hookCode("gBrowser.updateCurrentBrowser", /.*dispatchEvent[\s\S]*_tabAttrModified.*/, "$&};if (window.windowState != window.STATE_MINIMIZED) {");

//Don't close the last primary window with the las tab
TU_hookCode("gBrowser._beginRemoveTab", "_closeWindowWithLastTab", "$& && " + (function() { //Bug 607893
TU_hookCode("gBrowser._beginRemoveTab",
/_closeWindowWithLastTab|Services\.prefs\.getBoolPref\("browser\.tabs\.closeWindowWithLastTab"\)/, // Bug 997681 [Fx31]
"$& && " + (function() { //Implement to Bug 607893
(TU_getPref("extensions.tabutils.closeLastWindowWithLastTab", false) || function() {
var winEnum = Services.wm.getEnumerator("navigator:browser");
while (winEnum.hasMoreElements()) {
Expand Down

0 comments on commit 546c18e

Please sign in to comment.