mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 23:35:34 +00:00
with browser.tabs.warnOnClose set to true, onBeforeUnload events are executed before user confirmation that tabs are to be closed, r=gavin
This commit is contained in:
parent
4301671b45
commit
ce229d27e9
@ -5554,7 +5554,14 @@ function WindowIsClosing()
|
||||
{
|
||||
var cn = gBrowser.tabContainer.childNodes;
|
||||
var numtabs = cn.length;
|
||||
var reallyClose = true;
|
||||
var reallyClose =
|
||||
closeWindow(false,
|
||||
function () {
|
||||
return gBrowser.warnAboutClosingTabs(true);
|
||||
});
|
||||
|
||||
if (!reallyClose)
|
||||
return false;
|
||||
|
||||
for (var i = 0; reallyClose && i < numtabs; ++i) {
|
||||
var ds = gBrowser.getBrowserForTab(cn[i]).docShell;
|
||||
@ -5563,16 +5570,7 @@ function WindowIsClosing()
|
||||
reallyClose = false;
|
||||
}
|
||||
|
||||
if (!reallyClose)
|
||||
return false;
|
||||
|
||||
// closeWindow takes a second optional function argument to open up a
|
||||
// window closing warning dialog if we're not quitting. (Quitting opens
|
||||
// up another dialog so we don't need to.)
|
||||
return closeWindow(false,
|
||||
function () {
|
||||
return gBrowser.warnAboutClosingTabs(true);
|
||||
});
|
||||
return reallyClose;
|
||||
}
|
||||
|
||||
var MailIntegration = {
|
||||
|
Loading…
Reference in New Issue
Block a user