Closed Bug 284596 Opened 19 years ago Closed 17 years ago

onbeforeunload event is not fired on browser close


(Core :: DOM: Events, defect)

Not set





(Reporter: iannbugzilla, Unassigned)



(1 file)

326 bytes, text/html
Using Build 2005013106 on Win2K SP3
Steps to reproduce
1. Start mozilla with a -browser
2. Click on X to close

Expected result
1. Dialog appears from onbeforeunload

Actual result
1. Browser just closes

This can cause dataloss if the purpose of the unbeforeunload is to stop you
navigating away/closing the page before you complete the task the page is for.

It works fine if you fire up mozilla normally and go to the URL
Attached file Testcase
Attachment #176135 - Attachment description: Tescase → Testcase
If you start testcase using:
mozilla -browser
WFM 1.8b1 Mozilla Suite Solaris 8 Sparc
WFM: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050217
Sorry, correction: don't WFM
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050217
Reproduced on BuildID 2005020312 on Linux RH9
Reproduced on 1.8a5 on Solaris 9 Sparc
Reproduced on 1.8b1 on Solaris 9 Sparc
Re comment #3: Sorry, also NOT wfm. Tested without -browser.
jst, didn't we have a similar bug somewhere that we fixed in the 1.8 cycle?
That is, I recall a bug that only showed up on pages loaded directly on startup,
not ones we navigated to.  It wasn't about onbeforeunload, iirc....
WFM, SeaMonkey 20070209 Linux. (The dialog appears twice on Quit though -
filed bug 369955 on that.)
WFM Seamonkey 1.1 Linux(X11; U; Linux i686; en-US; rv: Gecko/20070121
Dialog does NOT appear twice here.
Sorry, #11 should have been 'WFM, but Dialog DOES appear twice on Quit'
WFM, SeaMonkey 2007020305 on MacOSX (bug 369955 occurs though)
WFM, SeaMonkey 2007020909 on Windows Vista (bug 369955 occurs though)

Closed: 17 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.