user-select: none in table adds linebreaks to copied text
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, defect, P3)
Tracking
()
People
(Reporter: mortenok, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: parity-chrome)
Attachments
(1 file)
(deleted),
text/html
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:73.0) Gecko/20100101 Firefox/73.0
Steps to reproduce:
Copied text in a table where some special content had user-select: none;
<table>
<caption>A table with some special text in a span with user-select:none;</caption>
<thead>
<tr>
<th>Much</th>
<th>Wow</th>
<th>Such</th>
<th>Select</th>
</tr>
</thead>
<tbody>
<tr>
<td>I</td>
<td>am</td>
<td>a <span style="user-select: none;">special</span></td>
<td>row</td>
</tr>
<tr>
<td>I</td>
<td>am</td>
<td>a</td>
<td>row</td>
</tr>
</tbody>
</table>
Given this markup:
1. Select text in the table and copy it
2. Paste the text anywhere (f.ex in a spreadsheet)
codepen to reproduce: https://codepen.io/mortenok/pen/oNXezbm
Actual results:
The copied text contained linebreaks in the positions where the non-selectable text was in the original table.
Note that this works fine when using the special Firefox funtionality (cmd+select) for selecting table data.
Expected results:
No linebreaks should be added.
Reporter | ||
Comment 1•5 years ago
|
||
Comment 2•5 years ago
|
||
Hi,
I've managed to reproduced the issue on Firefox 73.0.1 and Firefox Nightly 75.0a1
I'm setting a component in order to involve the development team in reviewing this issue.
If this isn't the correct one, feel free to set it to a more suitable one.
Thank you for reporting!
Thanks for the clear test case.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 4•3 years ago
|
||
The exported HTML is even more broken than the plaintext:
$ xclip -o -t text/html
<meta http-equiv="content-type" content="text/html; charset=utf-8"><table><thead><tr><th>Much</th>
<th>Wow</th>
<th>Such</th>
<th>Select</th>
</tr>
</thead>
<tbody>
<tr>
<td>I</td>
<td>am</td>
<td>a </td></tr></tbody></table><table><tbody><tr><td>row</td>
</tr>
<tr>
<td>I</td>
<td>am</td>
<td>a</td>
<td>row</td></tr></tbody></table>
Comment 5•3 years ago
|
||
It would be interesting to learn about real use-cases of user-select: none
within tables. From a UX perspective, that seems undesirable.
Updated•2 years ago
|
Description
•