RESOLVED INVALID 9661
textContent returns "\n" for a <br> or a '\n' even if it is collapsed
https://bugs.webkit.org/show_bug.cgi?id=9661
Summary textContent returns "\n" for a <br> or a '\n' even if it is collapsed
David Kilzer (:ddkilzer)
Reported 2006-06-29 23:49:19 PDT
When the last character in a text input field is deleted, a <br> placeholder is inserted.  The problem is that textContent returns "\n" for a <br> even if it's collapsed.  In HTMLInputElement:setValueFromRenderer(), value = "\n" and constrainValue(value) = "". See Bug 9358 for the original issue (an assertion failure).
Attachments
Justin Garcia
Comment 1 2006-10-26 18:45:26 PDT
textContent also returns '\n' for a '\n' even if it is collapsed. Renaming.
Darin Adler
Comment 2 2007-01-08 10:02:27 PST
I believe the behavior of textContent is correct, and it's the client that has a problem. I believe this bug report may be INVALID.
Anne van Kesteren
Comment 3 2023-09-01 04:40:32 PDT
Resolving this per comment 2 as INVALID as without a test case proving otherwise it seems highly unlikely that textContent has a bug.
Note You need to log in before you can comment on or make changes to this bug.