extra empty lines copied to the clipboard from <pre>
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, defect)
Tracking
()
People
(Reporter: lastp, Unassigned)
References
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0
Steps to reproduce:
Open this html in Firefox:
<pre id="p"></pre>
<script> p.textContent = "first line\r\nsecond line\r\nthird line\r\n";</script>
Then select all text, copy it to the clipboard and paste it into any text editor.
Actual results:
first line
second line
third line
Expected results:
first line
second line
third line
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::DOM: Editor' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•2 years ago
|
||
Confirmed on Linux comparing copy and paste from Firefox and Chrome to gedit.
Carriage returns don't appear in the DOM naturally, so it seems the plain text serializer is bad at dealing with this.
Updated•2 years ago
|
Description
•