New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 838169 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

When closing Terminal, get a "Leave site?" prompt

Project Member Reported by tbuck...@chromium.org, Apr 30 2018

Issue description

Chrome version: 68.0.3415.0 canary
OS: Chrome 10632.0.0

Repro steps:
1. Go through setup flow
2. Try to close terminal window at end without typing anything

Expected: Terminal closes
Actual: Get "Leave site?" prompt

 
the prompt text itself is generic and can't be controlled by JS ... it's what Chrome throws up automatically

being able to close crosh w/out being prompted would be a regression

we have issue 740216 for tracking a config option, but even with that, we wouldn't change the general crosh behavior.  we do not want people opening crosh (e.g. ctrl+alt+t), then accidentally pressing ctrl+w and having the tab be closed.
Cc: benwells@chromium.org nverne@chromium.org
Owner: rjwright@chromium.org
Something we can do is change the string to say 'app' instead of 'site' if it is running in an app window. I think that would be a good change but we probably should check with UI folks.

Tom - can you handle making sure this is OK from a UI perspective? It will affect desktop PWAs and installed websites running in windows as well.

Comment 4 by vapier@chromium.org, May 10 2018

that string is used on the open web as well, including crbug.com.  type some comment in here, then try to close the tab.  doesn't seem like changing "site" to "app" will work everywhere.
Yep, understood. It is a result of the onbeforeunload event.

We can't change it everywhere. But we probably should change it for installed web sites, hosted apps running in windows, and v1 legacy apps running in windows.
Labels: Hotlist-Crostini-UI
Status: Started (was: Assigned)

Comment 8 by vapier@chromium.org, May 23 2018

Labels: -Restrict-View-Google
Project Member

Comment 9 by bugdroid1@chromium.org, May 30 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5ab5786baf7cc895d525e534836ddc7dfc0c3b79

commit 5ab5786baf7cc895d525e534836ddc7dfc0c3b79
Author: Renee Wright <rjwright@chromium.org>
Date: Wed May 30 00:09:15 2018

Change "Leave site" dialog to "Leave app" for app windows

When a user closes a browser with unsaved data entered, we show
a dialog asking them to confirm close. Currently this dialog says
"leave site?" for all browsers. We would like to change it to "leave
app?" for apps.

Behavior for unloading a document is specified here
https://html.spec.whatwg.org/#unloading-documents
Notice in particular the note in step 8:
"
The message shown to the user is not customizable, but instead
determined by the user agent. In particular, the actual value of
the returnValue attribute is ignored.
"
This message used to be customizable, but now is not.

Bug:  838169 
Change-Id: I1f38e99b2d3f0d90ee4a0d4089528d3caf1b6c61
Reviewed-on: https://chromium-review.googlesource.com/1055134
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Trent Apted <tapted@chromium.org>
Reviewed-by: Ben Wells <benwells@chromium.org>
Commit-Queue: Renée Wright <rjwright@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562664}
[modify] https://crrev.com/5ab5786baf7cc895d525e534836ddc7dfc0c3b79/chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc
[modify] https://crrev.com/5ab5786baf7cc895d525e534836ddc7dfc0c3b79/components/app_modal/javascript_dialog_manager.cc
[modify] https://crrev.com/5ab5786baf7cc895d525e534836ddc7dfc0c3b79/components/app_modal/javascript_dialog_manager.h
[modify] https://crrev.com/5ab5786baf7cc895d525e534836ddc7dfc0c3b79/components/app_modal_strings.grdp

Status: Fixed (was: Started)

Sign in to add a comment