Closed Bug 1312897 Opened 8 years ago Closed 3 years ago

textarea removes newlines from placeholder but shouldn't

Categories

(Core :: Layout: Form Controls, defect)

49 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1391044

People

(Reporter: drew.m.fisher, Unassigned)

References

Details

User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0 Build ID: 20160919122641 Steps to reproduce: Navigate to a page which has a textarea element with a placeholder containing a line feed character. Actual results: In Firefox, the displayed placeholder appears to ignore or strip line feeds. https://jsfiddle.net/h270aght/3/ This issues affects the current stable (49) as well as nightly as of this writing (which I think is 52 branch). Expected results: The placeholder should be formatted with a linebreak for each LF, CR, or CRLF encountered, per https://www.w3.org/TR/html5/forms.html#attr-textarea-placeholder
Component: Untriaged → Layout: Form Controls
Product: Firefox → Core
Is there a possible ETA on this ?

A bit of a necromancy, but this is no longer an issue in current version (at least not in Nightly) as it now respects line breaks in placeholder.
But should it? I know the W3 spec says so, but W3 specs are often full of bull, that doesn't work in the wild. On the other hand, the WHATWG spec explicitly states placeholder shouldn't contain any line feed characters and if it does it should be stripped. Presumably together with any extraneous white space - a smart thing to do considering html is usually and often automatically indented as it's supposed to be human readable. This can wreck serious havoc on the placeholder text . I can see a use case for allowing line break escape sequences, but allowing literal line breaks is IMHO stupid.

This can be closed as a duplicate of bug 1391044.

Flags: needinfo?(emilio)

Thanks!

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Flags: needinfo?(emilio)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.