Issue metadata
Sign in to add a comment
|
onbeforeunload handler no longer allows custom confirm message
Reported by
xander.d...@gmail.com,
Jun 1 2016
|
||||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.63 Safari/537.36
Steps to reproduce the problem:
1. Create a window.onbeforeunload handler that returns a confirm('custom message')
2. reload the page
3.
https://jsfiddle.net/4fk04k2z/
What is the expected behavior?
The custom message is shown in the prompt
What went wrong?
The custom message was not shown in the prompt.
Did this work before? N/A
Chrome version: 51.0.2704.63 Channel: stable
OS Version: OS X 10.11.4
Flash Version: Shockwave Flash 21.0 r0
It's important to be able to show a custom message in this prompt, because the stock message does not apply to all scenarios "Changes you made may not be saved." doesn't make any sense if there are no changes and nothing to save. For example, we're using this is a webrtc phone application that shows the prompt to prevent disconnecting the call by accidentally reloading or closing the tab.
,
Jun 1 2016
If the new behavior is such that this is no longer available to customize, then I'd request that the message be changed if there are active RTCPeerConnections, to something like, "Your connection will be ended" Suggest label `webrtc` for this bug.
,
Jun 4 2016
The custom message appears when I click the Reload button in the link in #1.
,
Jun 4 2016
I am also having this problem. The text provided is never used. It was working previously. The w3schools page doesn't work either. http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onbeforeunload Chrome Version 51.0.2704.79 m
,
Jun 4 2016
https://www.chromestatus.com/features/5349061406228480 it says here that "custom messages in onbeforeunload dialogs" was removed in chrome 51 > It's important to be able to show a custom message in this prompt, because the stock message does not apply to all scenarios "Changes you made may not be saved." doesn't make any sense if there are no changes and nothing to save. i agree i noticed google play music shows that message when you try to close the tab while music is playing
,
Jun 5 2016
For almost any rich real-time application not being able to describe to the user why we are trying to prevent them from accidentally doing something they might not wan't to do is imperative. In my case there are several different cases where the default prompt is not good enough. Just some of our features that require this behavior: - Document changes - Chat - Video conference (webrtc) - Audio - Presentations - File transfer / upload - Queries in progress / long running task - Availability to other peers For the sake of being able to deliver richer experiences in a browser into the future we need to be able to have this kind of function somehow. I'm not convinced yet that "Changes you made may not be saved" is sufficient to describe the loss scenario in these cases and -will- be overlooked by users and the loss will be more frustrating than any result of abuse of the prompt.
,
Jun 6 2016
This has nothing to do with V8.
,
Jun 6 2016
,
Jun 6 2016
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by xander.d...@gmail.com
, Jun 1 2016