onbeforeunload event is not fired on browser close

RESOLVED WORKSFORME

Status

()

--
critical
RESOLVED WORKSFORME
14 years ago
12 years ago

People

(Reporter: iann_bugzilla, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

326 bytes, text/html
Details
(Reporter)

Description

14 years ago
Using Build 2005013106 on Win2K SP3
Steps to reproduce
1. Start mozilla with a -browser http://url.to.a.page/with/onbeforeunload/in/body
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
(Reporter)

Comment 1

14 years ago
Created attachment 176135 [details]
Testcase
(Reporter)

Updated

14 years ago
Attachment #176135 - Attachment description: Tescase → Testcase
(Reporter)

Comment 2

14 years ago
If you start testcase using:
mozilla -browser https://bugzilla.mozilla.org/attachment.cgi?id=176135

Comment 3

14 years ago
WFM 1.8b1 Mozilla Suite Solaris 8 Sparc

Comment 4

14 years ago
WFM: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050217

Comment 5

14 years ago
Sorry, correction: don't WFM
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050217
(Reporter)

Comment 6

14 years ago
Reproduced on BuildID 2005020312 on Linux RH9
Reproduced on 1.8a5 on Solaris 9 Sparc
Reproduced on 1.8b1 on Solaris 9 Sparc

Comment 7

14 years ago
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.)

Comment 11

12 years ago
WFM Seamonkey 1.1 Linux(X11; U; Linux i686; en-US; rv:1.8.1.2pre) Gecko/20070121
Dialog does NOT appear twice here.

Comment 12

12 years ago
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)

-> WORKSFORME
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.