Closed Bug 619857 Opened 14 years ago Closed 14 years ago

onbeforeunload handler in Firefox 4 beta 7 does not show custom message

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 641509

People

(Reporter: dntminh, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows NT 5.1; rv:2.0b7) Gecko/20100101 Firefox/4.0b7
Build Identifier: Mozilla/5.0 (Windows NT 5.1; rv:2.0b7) Gecko/20100101 Firefox/4.0b7

When I try to use onbeforeunload event handler to display a message to end-users, only the Firefox default message is displayed. The custom message is ignored, no matter how it is returned, both via event.returnValue and via return 'message' method of the function itself.

Reproducible: Always

Steps to Reproduce:
1. Assign an event handler to window.onbeforeunload event
2. In the event handler function, use both event.returnValue and return method to include a custom message beside the default message.
Actual Results:  
Only the default message is shown.
Internet Explorer and Google Chrome display correctly.

Expected Results:  
The custom message should be displayed along with the default message.
AFAIK, This is by design, see Bug 588292
Thanks Alice for your pointing out!
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.