[Webkit-unassigned] [Bug 220499] New: extarea placeholder does not respect newlines

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jan 9 14:01:15 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=220499

            Bug ID: 220499
           Summary: extarea placeholder does not respect newlines
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: webkit.org at shkspr.mobi
                CC: bfulgham at webkit.org, simon.fraser at apple.com,
                    zalan at apple.com

Created attachment 417343

  --> https://bugs.webkit.org/attachment.cgi?id=417343&action=review

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)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210109/cbf37e4b/attachment.htm>


More information about the webkit-unassigned mailing list