Bug 194157
| Summary: | Support line feed entities in attributes | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Lanny Heidbreder <webkit> |
| Component: | Forms | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED CONFIGURATION CHANGED | ||
| Severity: | Enhancement | CC: | ahmad.saleem792, ap, cdumez, firefoxic.dev, wenson_hsieh |
| Priority: | P2 | ||
| Version: | Safari Technology Preview | ||
| Hardware: | Mac | ||
| OS: | macOS 10.13 | ||
Lanny Heidbreder
OVERVIEW:
It would be useful to include line breaks in the placeholder attribute of a textarea element. Other browsers allow this by supporting the HTML entity for the Line Feed character, . But as of Safari Technology Preview 74, Safari doesn't render the entity.
STEPS TO REPRODUCE:
Create a textarea element with a placeholder attribute of "Line 1 Line 2"
EXPECTED RESULTS:
The textarea displays this placeholder text:
Line 1
Line 2
ACTUAL RESULTS:
The textarea displays this placeholder text:
Line 1Line 2
ADDITIONAL INFO:
Web Inspector displays the attribute with a space instead of the entity, while the rendered element in the browser has no space at all. However, selecting the textarea in the inspector and running $0.getAttribute('placeholder') in the console correctly displays the line break.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
I changed it into following JSFiddle:
Link - https://jsfiddle.net/geynrdak/show
I am not able to reproduce "Actual Result" in above using Safari 16.1 and it shows similar to Firefox Nightly 108 and Chrome Canary 110.
Marking this as "RESOLVED CONFIGURATION CHANGED". Thanks!