WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 217837
220499
textarea placeholder does not respect newlines
https://bugs.webkit.org/show_bug.cgi?id=220499
Summary
textarea placeholder does not respect newlines
Terence Eden
Reported
2021-01-09 14:01:15 PST
Created
attachment 417343
[details]
Screenshot of error. Placeholder text in a textarea can have newlines. But WebKit strips them out. Steps to reproduce: Create a `<textarea>` with a multi-line placeholder. ``` <textarea placeholder="In loving memory of Buffy Anne Summers She saved the world A lot..."></textarea> ``` Actual results: The placeholder renders as a single line. The newlines are removed and there's no replacement whitespace: `In loving memory ofBuffy Anne SummersShe saved the worldA lot...` Expected results: Placeholder should display over multiple lines. Spec:
> User agents should present this hint to the user when the element’s value is the empty string and the control is not focused (e.g., by displaying it inside a blank unfocused control). 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.
https://www.w3.org/TR/html52/sec-forms.html#element-attrdef-textarea-placeholder
I've tested this on WebKitGTK 2.30.4 on Linux, and seen the problem on the latest Safari for iPhone. (This bug was also reported to Firefox, and fixed -
https://bugzilla.mozilla.org/show_bug.cgi?id=1391044
)
Attachments
Screenshot of error.
(50.76 KB, image/png)
2021-01-09 14:01 PST
,
Terence Eden
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-01-16 14:02:14 PST
<
rdar://problem/73285124
>
Claude Pache
Comment 2
2021-08-19 01:13:42 PDT
This is a duplicate of
Bug 217837
Simon Fraser (smfr)
Comment 3
2021-08-19 09:08:41 PDT
*** This bug has been marked as a duplicate of
bug 217837
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug