<textarea> placeholder doesn't line break on explicit U+000D CARRIAGE RETURN (CR)
Reported by
ambassad...@gmail.com,
Dec 2 2017
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0 Steps to reproduce the problem: 1. Set the placeholder of a textarea to a value including \r via JS/Include 
 in the source of a textarea placeholder 2. Observe that they aren't rendered as line breaks in the placeholder What is the expected behavior? textarea placeholders should render CRs as line breaks in all instances. What went wrong? When the HTML source for a placeholder includes explicit CRs via entities, or when a placeholder is set via JS containing \r, line breaks aren't rendered. Did this work before? No Does this work in other browsers? No There are three scenarios to test: CR in the source, CR as an entity (
) in the source, and setting a value via JS with a CR as \r in the string. Chrome line breaks on all three in textarea content, but only on CR in the source for the placeholder. Firefox is currently worse since it doesn't support newlines in textarea placeholders at all, but that is in the process of being fixed, and it was while doing so and writing web platform tests for it that this behaviour came to light. It line breaks for all three scenarios in textarea content. https://bugzilla.mozilla.org/show_bug.cgi?id=1391044 Edge does the same as Chrome for placeholders, but extends that behaviour to the content of the textarea as well (only CR in source), so is at least the most consistent of the three between placeholder and content, but the worst in terms of the spec. Chrome version: 62.0.3202.94 (Official Build) Built on Ubuntu , running on Ubuntu 17.04 (64-bit) Channel: n/a OS Version: Flash Version: https://html.spec.whatwg.org/multipage/form-elements.html#attr-textarea-placeholder "All U+000D CARRIAGE RETURN U+000A LINE FEED character pairs (CRLF) in the hint, as well as all other U+000D CARRIAGE RETURN (CR) and U+000A LINE FEED (LF) characters in the hint, must be treated as line breaks when rendering the hint.
,
Dec 27 2017
Can editing team triage this?
,
Jan 9 2018
For simplicity, should we convert sole CR to LF when setting placeholder?
,
Jan 10
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jan 11
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by sc00335...@techmahindra.com
, Dec 6 2017Labels: Needs-Triage-M62 Triaged-ET M-65 OS-Mac OS-Windows
Status: Untriaged (was: Unconfirmed)