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

Issue 737138 link

Starred by 3 users

Issue metadata

Status: Duplicate
Merged: issue 392843
Owner:
Last visit > 30 days ago
Closed: Oct 16
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 751601



Sign in to add a comment

Setting textarea.defaultValue should wipe out any children

Project Member Reported by domenic@chromium.org, Jun 27 2017

Issue description

Chrome Version: Version 61.0.3142.1 (Official Build) canary SyzyASan (32-bit)

Per the recently-clarified specification for textarea.defaultValue in https://github.com/whatwg/html/pull/2766, setting defaultValue should act like setting textContent. (In fact, this was the case with the old specification as well.) This means it should wipe out any children of the textarea.

The tests at http://w3c-test.org/submissions/6256/html/semantics/forms/the-textarea-element/value-defaultValue-textContent.html show that this is not the case in Chrome.

The tests will end up at http://w3c-test.org/html/semantics/forms/the-textarea-element/value-defaultValue-textContent.html when https://github.com/w3c/web-platform-tests/pull/6256 is merged.

 

Comment 1 by tkent@chromium.org, Jun 29 2017

Labels: Hotlist-Interop
Status: Available (was: Untriaged)
Owner: shanmug...@samsung.com
Status: Assigned (was: Available)
Status: Started (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, Jul 25 2017

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

commit 6a53ba2305e2d0196d8f46f8590e0ad1fa45d636
Author: Shanmuga Pandi M <shanmuga.m@samsung.com>
Date: Tue Jul 25 15:07:16 2017

Setting textArea.defaultValue should wipe out any children.

On setting, it must act as the setter for the element's
textContent IDL attribute and it should not normalize line endings.

spec:
https://html.spec.whatwg.org/multipage/form-elements.html#dom-textarea-defaultvalue

Bug:  737138 
Change-Id: Ib4973e72b168b083e522d8fd91262a9868cf6523
Reviewed-on: https://chromium-review.googlesource.com/579227
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489300}
[delete] https://crrev.com/a9f278a0500975315f87c79e1f2dca81a2f79a05/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-textarea-element/value-defaultValue-textContent-expected.txt
[modify] https://crrev.com/6a53ba2305e2d0196d8f46f8590e0ad1fa45d636/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-textarea-element/value-defaultValue-textContent.html
[modify] https://crrev.com/6a53ba2305e2d0196d8f46f8590e0ad1fa45d636/third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-selection-preservation-expected.txt
[modify] https://crrev.com/6a53ba2305e2d0196d8f46f8590e0ad1fa45d636/third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-selection-preservation.html
[modify] https://crrev.com/6a53ba2305e2d0196d8f46f8590e0ad1fa45d636/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp

Comment 5 by tkent@chromium.org, Jul 25 2017

Labels: M-62
Status: Fixed (was: Started)
Project Member

Comment 6 by bugdroid1@chromium.org, Jul 28 2017

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

commit c008e20c9be6564277df6faab48984c627028758
Author: Kent Tamura <tkent@chromium.org>
Date: Fri Jul 28 04:02:19 2017

Revert "Setting textArea.defaultValue should wipe out any children."

This reverts commit 6a53ba2305e2d0196d8f46f8590e0ad1fa45d636.

Reason for revert: A serious regression.  crbug.com/749729 

Original change's description:
> Setting textArea.defaultValue should wipe out any children.
> 
> On setting, it must act as the setter for the element's
> textContent IDL attribute and it should not normalize line endings.
> 
> spec:
> https://html.spec.whatwg.org/multipage/form-elements.html#dom-textarea-defaultvalue
> 
> Bug:  737138 
> Change-Id: Ib4973e72b168b083e522d8fd91262a9868cf6523
> Reviewed-on: https://chromium-review.googlesource.com/579227
> Commit-Queue: Kent Tamura <tkent@chromium.org>
> Reviewed-by: Kent Tamura <tkent@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#489300}

TBR=tkent@chromium.org,shanmuga.m@samsung.com,domenic@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  737138 ,  749729 
Change-Id: Iadf1d385478f5545e1cf0c9ef903f4797557066e
Reviewed-on: https://chromium-review.googlesource.com/590827
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490253}
[add] https://crrev.com/c008e20c9be6564277df6faab48984c627028758/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-textarea-element/value-defaultValue-textContent-expected.txt
[modify] https://crrev.com/c008e20c9be6564277df6faab48984c627028758/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-textarea-element/value-defaultValue-textContent.html
[modify] https://crrev.com/c008e20c9be6564277df6faab48984c627028758/third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-selection-preservation-expected.txt
[modify] https://crrev.com/c008e20c9be6564277df6faab48984c627028758/third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-selection-preservation.html
[modify] https://crrev.com/c008e20c9be6564277df6faab48984c627028758/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp

Comment 7 by tkent@chromium.org, Jul 28 2017

Labels: -M-62
Status: Assigned (was: Fixed)
Similar issue like  Bug 749729  is seen with "textContent".

<textarea id="x"></textarea>
  <script>
    x.addEventListener('input', function(e) {
      x.textContent= x.value;
    });
  </script>
Blockedon: 751601
Mergedinto: 392843
Status: Duplicate (was: Assigned)

Sign in to add a comment