Closed Bug 1343853 Opened 8 years ago Closed 8 years ago

multiline javascript newlines aren't supported

Categories

(Firefox :: Untriaged, defect)

51 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1312897

People

(Reporter: kunda, Unassigned)

Details

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.
Sorry for all the noise. I'm also adding a downstream bug for reference: https://freecadweb.org/tracker/view.php?id=2846
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.
yea.. it's a dupe Thanks!
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.