Open Bug 631195 Opened 13 years ago Updated 2 years ago

OnUnload event handler terminates when window.location.href = 'MY_APP/logout' is invoked inside.

Categories

(Firefox :: General, defect)

3.6 Branch
x86
Windows 7
defect

Tracking

()

UNCONFIRMED

People

(Reporter: maciej.dworznik, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; pl; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; pl; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13

Our application has to invalidate session before user close the browser. Due to that we put some warning on beforeUnload, and then if user confirm, we wont to invoke our servlet to logout. It works fine, when user clicks e.g. 'back' button, but it doesn't work when he close tab or browser. Details below.

Reproducible: Always

Steps to Reproduce:
1.Open attached test case
2.Click 'reload' - works fine, no errors in Error console
3.Close tab. Error in Error console
Actual Results:  
Action is not executed. Error in Error console

Expected Results:  
window.location.href should send the request but not open new window(e.g to invoke some servlet)

Example of error from error console:
Błąd: uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMLocation.href]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: http://localhost:7001/PA_WEB/faces/start?_adf.ctrl-state=apawa1la2_19 :: anonymous :: line 16"  data: no]
Attached file Test case
Version: unspecified → 3.6 Branch
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: