Closed Bug 356923 Opened 18 years ago Closed 14 years ago

When closing a tab (but not when closing a window), form-submit inside of window.onunload is ignored

Categories

(Firefox :: Tabbed Browser, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: petr.zdrahal, Unassigned)

References

Details

(Whiteboard: [CLOSEME 2010-11-15])

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7 On a test page (startme.html), there is a HTML-Form which is submitted from within of the "window.onunload" handler. Without tabbed browsing this works as expected and the form gets submitted anytime such document is being reloaded or when the browser window is being closed. However, when the same document is opened in tabbed browsing as one of the tabs, and this tab is then being closed [->Close Tab], the firefox ignores submit such form, no corresponding HTTP-request is sent. Reproducible: Always Steps to Reproduce: 1. Download testfiles (startme.html, final.html) and store them to the same directory on the webserver 2. Disable popup blocker for the startme.html 3. Open 3 browser tabs (CTRL-T) and on each run then "startme.html" 4. Reload one tab 5. Close one tab 6. Close the whole window (confirm a dialog for 2 remaining tabs) Actual Results: In the step 4.: the form-submit for reloaded document happens as expected In the step 5.: there is no form-submit performed, no new window will be opened, no POST-Request is visible in HTTP-Traffic. In the step 6. After you confirm to close 2 remaining tabs, you will get form-submit for each of them (2 new windows, 2 new requests visible in HTTP traffic). In contrary, in the step 5., after you confirm you want to close remaining 2 tabs, the forms for each of them are submitted, 2 new windows will be opened and 2 HTTP-Post requests are visible in network traffic. Expected Results: No matter whether reloading a single tab, closing a single tab or closing the whole window with several tabs, the onunload-handling has to behave consistently in the same way. Thus in the step 5. we expect that the form-submit gets performed in exactly same way as in the steps 4. or 6., allowing to submit a form inside of the onunload-handler. * Same behavior reproducible also with Firefox 2.0b1 and Mozilla 1.7.13 * The "Tamper Data" plugin was used to check the network traffic. * Happens for both POST and GET methods when submitting a form
Main testcase
Attachment #242472 - Attachment description: test case → startme.html (test case)
Related to bug 84833?
Summary: When closing a tab, Form-submit inside of window.onunload is ignored → When closing a tab (but not when closing a window), form-submit inside of window.onunload is ignored
Depends on: CVE-2007-1095
This bug was reported using Firefox 3.0 or older, which is no longer supported. The bug has also not been changed in over 500 days and is still in UNCO. Reporter, please retest this bug in Firefox 3.6.10 or later using a fresh profile, http://support.mozilla.com/en-US/kb/managing+profiles. If you still see this problem, please update the bug. If you no longer see the bug, please set the resolution to RESOLVED, WORKSFORME. This is a mass search of unconfirmed bugs that have no activity on them, so if you feel a bug was marked in error, just remove the CLOSEME comment in the whiteboard within the next month.
Whiteboard: [CLOSEME 2010-11-15]
Retested: - the behavior has changed in all browsers in a meantime - neither FF nor other browser proceed with the submitting of Form during onunload phase in reliable way - guess due to stronger security. Thus I close this message.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: