New issue
Advanced search Search tips

Issue 811358 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

Consider "open in new tab" option on dialog which prevents destroying form data on navigation.

Project Member Reported by dalecur...@chromium.org, Feb 12 2018

Issue description

Nearly every time I get stopped for unsent form data, I still want to navigate to wherever I was trying to go. It'd be nice if in addition to the "Stay" and "Leave" options there was a "Open in New Tab" to transfer the navigation to a new tab and leave your current tab alone.

Sorry if this is a dupe or wrong category, couldn't find anything in search. Thanks for consideration!
 

Comment 1 by rpop@chromium.org, Feb 12 2018

Cc: markchang@chromium.org a...@chromium.org
+avi for oldspice
+mark for desktop UI misc.

Comment 2 by a...@chromium.org, Feb 12 2018

When you talk about being "stopped for unsent form data", I'm supposing you mean that the page enables a beforeunload handler when it sees form data that wasn't submitted. (Getting stopped for unsent form data isn't a feature of Chrome.)

That makes this feature request a tough one. Because this is a feature of the web page, and not of Chrome, this would mean adding in options to the beforeunload dialog. That would involve spec changes to a feature that we're trying to remove (see the page lifecycle peeps for more info). In addition, the beforeunload dialog is a highly abused feature, which means that any change to it involves consideration as to how it would affect its abusability.
Oh, I didn't realize that was not a Chrome feature. E.g., the dialog on this bug if I try to navigate away is provided by beforeunload? If that's the case, I see how this would be unfixable without extending the API (which itself is metered by abuse).

Thanks for the explanation and feel free to WF.

Comment 4 by a...@chromium.org, Feb 12 2018

Status: WontFix (was: Untriaged)
> E.g., the dialog on this bug if I try to navigate away is provided by beforeunload?

Indeed it is. If you do a view-source, on line 3752:

window.onbeforeunload = function() {
 if (TKR_isDirty()) {
 // This message is ignored in recent versions of Chrome and Firefox.
 return "You have unsaved changes. Leave this page and discard them?";
 }
 };

And TKR_isDirty is defined in tracker-editing.js as

/**
 * This function returns true if the user has made any edits to fields of
 * interest.
 */
function TKR_isDirty() {
  return TKR_initialFormValues != TKR_currentFormValues();
}

so yeah, sorry. 😢

Sign in to add a comment