user-select: none causes a line break when copying content
Categories
(Core :: DOM: Serializers, defect)
Tracking
()
People
(Reporter: reg-mozilla, Unassigned)
References
(Depends on 1 open bug)
Details
Attachments
(1 file)
161 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0
Steps to reproduce:
Create a HTML file with the following content:
<pre>
<span>Test</span> <span style="user-select:none">screen reader only text</span> <span>line</span>
</pre>
Then open the file and copy the content.
Actual results:
The text copied contains a line break for the hidden element.
Expected results:
There should be no line break in the copied content.
Note: this is important for providing screen reader support and retain the ability to copy text (e.g. code) from a website.
Comment 1•9 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Layout: Form Controls' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•9 months ago
|
||
can confirm the behaviour. Repros on a build from Jan2022 so not a regression.
Chrome has a different behaviour where it doesnt have the newline.
Updated•9 months ago
|
Ah, user-select:none
causes splitting the selection range (bug 1773065). So, once it's fixed, this will be fixed.
Updated•9 months ago
|
Description
•