Closed Bug 1069436 Opened 10 years ago Closed 10 years ago

onbeforeunload Does Not Use Embedded Text On Return

Categories

(Core :: General, defect)

32 Branch
x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 641509

People

(Reporter: gerry, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; rv:32.0) Gecko/20100101 Firefox/32.0
Build ID: 20140911151253

Steps to reproduce:

Here is the code
<script language="JavaScript">
window.onbeforeunload=function(){return "You are attempting to leave this page."+"\n\n" + "If you have made changes and not saved them they will be lost!";};
</script>



Actual results:

The function returns a default text message ...

This page is asking you to confirm that you want to leave - data you have entered may not be saved.


Expected results:

It should return
"You are attempting to leave this page

f you have made changes and not saved them they will be lost!"

It works in the current version of IE
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Summary: onbeforeun Does Not Use Embedded Text On Return → onbeforeunload Does Not Use Embedded Text On Return
It seems Facebook shows a message properly on firefox. To reproduce go to your facebook page (if you have one) then type something on the status box. now try to navigate away from the page and it shows a custom message. Anyone know how they do this?
You need to log in before you can comment on or make changes to this bug.