onbeforeunload dialog: "Stay on Page" and "Leave Page" are wrong for a reload

NEW
Unassigned

Status

()

Core
DOM: Events
4 years ago
4 years ago

People

(Reporter: gerv, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

The onbeforeunload event is often used to warn people that they may lose data. The text is:

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

(Stay on Page) (Leave Page)"

The same dialog appears if you reload a page. However, in this case, the text (particularly the button text) is inappropriate and confusing. After all, the point about a reload is that you aren't leaving the page, you are staying on the same page. 

So I suggest that if we can detect that a Reload has triggered this event, we instead say:

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

(Do Not Reload Page) (Reload Page)"

Gerv

Updated

4 years ago
See Also: → bug 1090940
You need to log in before you can comment on or make changes to this bug.