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

Issue 671969 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Unnecessary file gets downloaded and 'Save to file' button is enabled even if there is no text in textarea.

Reported by dmascare...@etouch.net, Dec 7 2016

Issue description

Chrome Version:57.0.2944.0 (Official Build) bb1ac197d94d071514695c0f23854881db26f012-refs/heads/master@{#436816} 32/64 bit
OS:Mac(10.11.6, 10.12.1, 10.12), Windows(7,8,8.1,10), Linux (14.04 LTS)

What steps will reproduce the problem?
1. Launch chrome and navigate to chrome://net-internals/#export
2. Type some text in textarea such that 'Save to file' button gets enabled.
3. Continuously press 'Backspace' key from keyboard and then click on 'Save to file' button.
4. Observe.

Actual: Unnecessary file gets downloaded and 'Save to file' button is enabled even if there is no text in textarea.
Expected: 1. File should not get downloaded and 'Warning' message should be seen after text area is empty. 
          2. 'Save to file' button should get disabled.
          
This is non-regression issue, newly introduced feature from 'M 57' (57.0.2944.0)
 
Actual.mp4
860 KB View Download
Expected.mp4
210 KB View Download
Status: Untriaged (was: Unconfirmed)
Untriaged it so that it gets addressed.
Owner: changwan@chromium.org
Status: Assigned (was: Untriaged)
This is probably caused by https://codereview.chromium.org/2544263002. Let me take a look.
Project Member

Comment 3 by bugdroid1@chromium.org, Dec 8 2016

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

commit 1dfe6d2f4f55e4a344b51c16fe0fa23bd00f21a9
Author: changwan <changwan@chromium.org>
Date: Thu Dec 08 18:50:45 2016

Update save file button based on states

On chrome://net-internals/#export, when you backspace really quickly and
save to file at almost the same time, then save button becomes enabled
even when the textarea is empty.

There are currently two paths to enable or disable save file button:
1) UserComments is empty or not empty.
2) We are saving button / not saving button.

Things can get wrong if the two paths conflict with each other.

In fixing this, we also change the function structure such that save file
button is enabled / disabled based on both states.

BUG= 671969 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2562633003
Cr-Commit-Position: refs/heads/master@{#437295}

[modify] https://crrev.com/1dfe6d2f4f55e4a344b51c16fe0fa23bd00f21a9/chrome/browser/resources/net_internals/export_view.js

Status: Fixed (was: Assigned)

Sign in to add a comment