multiline javascript newlines aren't supported

RESOLVED DUPLICATE of bug 1312897

Status

()

Firefox
Untriaged
RESOLVED DUPLICATE of bug 1312897
10 months ago
10 months ago

People

(Reporter: kunda, Unassigned)

Tracking

51 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

10 months ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0
Build ID: 20170126200443

Steps to reproduce:

Please run the snippet in: 
http://stackoverflow.com/questions/7189223/can-you-have-multiline-html5-placeholder-text-in-a-textarea/25261886#25261886

Another example is opening up: https://freecadweb.org/tracker/bug_report_page.php 
and looking at the 'Steps to Reproduce' section. In FF the placeholder text is all on one line. In Chrome it isn't. The script used is at https://github.com/FreeCAD/Homepage/pull/7/commits/a9e69bbdc694b37603738c86f832be369b46bb34


Actual results:

text ended up all in one line. 


Expected results:

The expected result should be multiline with news lines.
(Reporter)

Comment 1

10 months ago
According to: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals it should be supported...correct?
(Reporter)

Comment 2

10 months ago
Sorry for all the noise. I'm also adding a downstream bug for reference: https://freecadweb.org/tracker/view.php?id=2846

Comment 3

10 months ago
Do you mean this snippet?

> var textAreas = document.getElementsByTagName('textarea');
> 
> Array.prototype.forEach.call(textAreas, function(elem) {
>     elem.placeholder = elem.placeholder.replace(/\\n/g, '\n');
> });
> 
> <textarea class="textAreaMultiligne" 
>           placeholder="Hello,\nThis is multiligne example\n\nHave Fun"
>           rows="5" cols="35"></textarea>

it has nothing to do with template literals.

if it's about newline in placeholder, it would be a dupe of bug 1312897.
(Reporter)

Comment 4

10 months ago
yea.. it's a dupe 
Thanks!
Status: UNCONFIRMED → RESOLVED
Last Resolved: 10 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1312897
You need to log in before you can comment on or make changes to this bug.