Firefox doesn't let you paste text with newlines into prompt() response
Categories
(Toolkit :: Content Prompts, defect)
Tracking
()
People
(Reporter: wyattscarpenter, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
Steps to reproduce:
Try pasting
this text into
console.log(prompt())
Using latest Chrome [Version 91.0.4472.101 (Official Build) (64-bit)] and latest Firefox [89.0 (64-bit)] on the latest version of Windows 10, I tried pasting multi-line text into a prompt and logging the returned string to console. Chrome printed a multi-line string and Firefox a single line string.
Actual results:
Chrome preserves newline characters supplied by the user to prompt(), but Firefox doesn't.
Expected results:
Judging by the HTML living standard https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-prompt , which makes no reference to disallowing newline characters in the user's response, this is probably a bug in Firefox.
Comment 1•4 years ago
|
||
Thank you for the report!
I can reproduce this on all the latest Firefox versions on MacOS. Moving this over to it's component so the developers can also check it out.
Updated•2 years ago
|
Description
•