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

Issue 750451 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

<input type="hidden"> values get reset between page navigation events

Reported by christop...@gmail.com, Jul 29 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36

Steps to reproduce the problem:
1. load page with an <input type="hidden">
2. set its value with JavaScript
3. navigate away
4. navigate back
5. access the element's value; it will now be reset

What is the expected behavior?

What went wrong?
In Chrome 59, the value of the <input type="hidden"> was preserved between page navigations.  It is not in Chrome 60.  The value of <input type="text"> and <textarea> are correct.

Did this work before? Yes Chrome 59

Chrome version: 60.0.3112.78  Channel: stable
OS Version: OS X 10.11.6
Flash Version:
 

Comment 1 by hdodda@chromium.org, Jul 31 2017

Cc: hdodda@chromium.org
Labels: Needs-Feedback
@christopher.venning-- Could you please provide us the sample test page/url to reproduce the issue and also please help us by providing the screencast of the issue or expected result.

Thanks!
An example HTML file that demonstrates the issue is included at the bottom of this comment.  I have also attached it.  In the example, I have also included an <input type="text"> element to demonstrate the expected behavior since other input types do not appear to have been affected by this regression (I have not tested them all).  I don't really have the ability to do a screencast.

Specific steps for this example:
  1. open the file
  2. type anything into the text input box
  3. click link to navigate to google.com
  4. click browser's back button
  5. observe that the text input's value has been preserved but the hidden input's value has not been preserved

I appreciate that this is a very rare corner case, but it is still a regression from Chrome 59 behavior.



<!doctype html>
<pre><code id="msg"><b>Message log</b><br></code></pre><br>
type something here first --&gt; <input type="text" id="text"></input><br>
<input type="hidden" id="hidden"></input><br>
then navigate away and then navigate back --&gt; <a href="https://www.google.com">Google</a>
<script>
    window.onload = function () {
        var hidden = document.getElementById("hidden");
        var text = document.getElementById("text");
        var msg = document.getElementById("msg");
        msg.innerHTML += "&lt;input type=\"text\"&gt; value on load: " + JSON.stringify(text.value) + " <b>(when you navigate back, this should be whatever you typed below)</b>\n";
        msg.innerHTML += "&lt;input type=\"hidden\"&gt; value on load: <span style='background:yellow;'>" + JSON.stringify(hidden.value) + "</span> <b>(when you navigate back, this <i>should</i> be \"foo\")</b>\n";
        hidden.value = "foo";
        msg.innerHTML += "&lt;input type=\"hidden\"&gt; value set after load by JS: " + JSON.stringify(hidden.value) + "\n";
    };
</script>

chrome-60-hidden-input-problem.html
1.0 KB View Download
Project Member

Comment 3 by sheriffbot@chromium.org, Jul 31 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "hdodda@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Components: -Blink Blink>Forms

Comment 5 by tkent@chromium.org, Aug 1 2017

Components: -Blink>Forms Blink>Forms>Restore
Owner: tkent@chromium.org
Status: WontFix (was: Unconfirmed)
This is a recent intentional behavior change; crrev.com/471669

Alright.  Thanks for the response.

Sign in to add a comment