Bug 9661
Summary: | textContent returns "\n" for a <br> or a '\n' even if it is collapsed | ||
---|---|---|---|
Product: | WebKit | Reporter: | David Kilzer (:ddkilzer) <ddkilzer> |
Component: | Forms | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | adele, annevk, ap, darin, ian, justin.garcia, mitz, sullivan |
Priority: | P2 | ||
Version: | 420+ | ||
Hardware: | Mac | ||
OS: | OS X 10.4 |
David Kilzer (:ddkilzer)
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Justin Garcia
textContent also returns '\n' for a '\n' even if it is collapsed. Renaming.
Darin Adler
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
Resolving this per comment 2 as INVALID as without a test case proving otherwise it seems highly unlikely that textContent has a bug.