Bug 210639 Confirm tab close ignores "Close Window"

patch by riceman+bmo@mail.rit.edu r=neil sr=jag
This commit is contained in:
timeless%mozdev.org 2003-06-27 17:03:15 +00:00
parent bddd5e070b
commit 4087c0899c
2 changed files with 8 additions and 1 deletions

View File

@ -1247,6 +1247,13 @@ function BrowserCloseTabOrWindow()
BrowserCloseWindow();
}
function BrowserTryToCloseWindow()
{
//give tryToClose a chance to veto if it is defined
if (typeof(window.tryToClose) != "function" || window.tryToClose())
BrowserCloseWindow();
}
function BrowserCloseWindow()
{
// This code replicates stuff in Shutdown(). It is here because

View File

@ -129,7 +129,7 @@
<command id="cmd_quit"/>
<command id="cmd_close" oncommand="BrowserCloseTabOrWindow()"/>
<command id="cmd_closeOtherTabs" oncommand="BrowserCloseOtherTabs()"/>
<command id="cmd_closeWindow" oncommand="BrowserCloseWindow()"/>
<command id="cmd_closeWindow" oncommand="BrowserTryToCloseWindow()"/>
<!-- Edit Menu -->
<command id="cmd_undo"/>