Issue metadata
Sign in to add a comment
|
onbeforeunload doesn't work correctly with "Warn Before Quitting"
Reported by
jo...@figma.com,
Jan 3
|
||||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:64.0) Gecko/20100101 Firefox/64.0 Steps to reproduce the problem: 1. Enable "Warn Before Quitting" in the Chrome menu 2. Go to website that uses `onbeforeunload` 3. Press Command-Q twice What is the expected behavior? The browser to show a "Are you sure you want to close" dialog before doing anything else. If the user choose "stay on page" for the browser window and the web page to still be shown normally. What went wrong? The browser hides the current window and *then* shows the "Are you sure you want to close" dialog. If the user choose "stay on page" the page appears to still be running (it's still sending network requests), but it isn't shown anywhere, so there's no way for the user to interact with it. Did this work before? N/A Does this work in other browsers? Yes Chrome version: 71.0.3578.98 Channel: n/a OS Version: OS X 10.14 Flash Version: This is a data-loss issue for us since if the user close our website with unsaved data, there's no way for the user to get back to the webpage to save the data before closing the page. I.e. "onbeforeunload" exists to prevent users from losing data entered but not saved. Since it's not working it's easy for the user to accidentally lose such data.
,
Jan 4
Thanks for filing the issue... @reporter: As mentioned in step#2 in comment#0, could you please provide a sample URL that uses 'onbeforeunload' so that it would be really helpful in triaging of the issue.
,
Jan 4
Test url: data:text/html,<html><input type=text onchange="window.onbeforeunload=()=>true">
,
Jan 4
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jan 4
Same testcase provided as an attachment with explicit instructions.
,
Jan 7
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by vamshi.kommuri@chromium.org
, Jan 4