Issue metadata
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.
,
Oct 23
Sounds like bug 897643 .
,
Oct 23
it seems every <td> contains a postfix of whitespace till (n-1)th <td> tag. So, this occurs. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by swarnasree.mukkala@chromium.org
, Oct 23