New issue
Advanced search Search tips

Issue 898042 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 897643
Owner: ----
Closed: Oct 23
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Extra spaces in javascript innerText function

Reported by manoharr...@gmail.com, Oct 23

Issue description

Chrome Version       : Version 70.0.3538.67 (Official Build) (64-bit)
URLs (if applicable) : all
Other browsers tested:
  Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
     Safari: OK
    Firefox: OK
       Edge: OK

What steps will reproduce the problem?
(1) Create an html file and add following code
--------------------------------------------------------------------
<html>
<head></head>
<table><tr>
<td id="test">Test 1</td>
<td id="test2">Test 2</td>
</tr></table>
<p>The text in the box Test1 is [<input id="value1"/>]</p>
<p>The text in the box Test2 is [<input id="value2"/>]</p>
<script>
document.getElementById('value1').value='<'+document.getElementById('test').innerText+'>'
document.getElementById('value2').value='<'+document.getElementById('test2').innerText+'>'
</script>
</html>
------------------------------------------------------------------------
(2) Open this file in chrome browser
(3) Check the spaces after the Value1

What is the expected result?
Ouput:
Test 1	Test 2
The text in the box Test1 is [<Test 1>]

The text in the box Test2 is [<Test 2>]


What happens instead?
Output: Note the extra spaces after Test1, but not after Test2.
Test 1	Test 2
The text in the box Test1 is [<Test 1	>]
The text in the box Test2 is [<Test 2>]


Please provide any additional information below. Attach a screenshot if
possible.

 
x.html
439 bytes View Download
Labels: Needs-Triage-M70
Sounds like  bug 897643 .
it seems every <td> contains a postfix of whitespace till (n-1)th <td> tag. So, this occurs.
Cc: viswa.karala@chromium.org
Labels: Triaged-ET
Mergedinto: 897643
Status: Duplicate (was: Unconfirmed)
As per comment# 2, issue seems to be similar to Issue:  897643 , hence merging into it and marking it as Duplicate.
Note: Feel free to Un-Dupe it if not the case.

Thanks!

Sign in to add a comment