Copy <ol> (ordered list) items and paste into plaintext app doesn't paste item numbers
Categories
(Core :: DOM: Serializers, defect)
Tracking
()
People
(Reporter: 367, Unassigned)
Details
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.16-22eric i586; en-US; m18)
Gecko/20001123
BuildID: 2000112308
When you select an ordered list with item numbers, these items numbers are not
propogated into the pasted text. I can almost see this behavior with bullets
and unordered lists, but I think the item numbers are a good thing to include
with ordered lists.
Reproducible: Always
Steps to Reproduce:
Select text containing an ordered list
paste
Actual Results:
Item 1
Item 2
Item 3
Expected Results:
- Item 1
- Item 2
- Item 3
Comment 2•10 months ago
|
||
Henri, do you know if it is expected? Apparently our behavior changed since https://bugzilla.mozilla.org/show_bug.cgi?id=191842#c7. Firefox and Chrome behave the same.
the problem is two fold. for example, even on this exact page, if I copy the numbered list above, when I paste into the comment I am typing now, I get:
Item 1
Item 2
Item 3
secondly, this behavior breaks round-trip markdown editing. so if I have some markdown:
- alfa
- bravo
- charlie
and I copy it into Firefox, once the markdown is rendered as HTML I can no longer get the original markdown back - this surfaced for my on Jira, but I suspect many WYSIWYG editors have the same issue
We have logic in the plaintext serializer to generate the numbers, but it is tied to a flag that is documented to be incompatible with another flag that we use when preparing plaintext for the clipboard and it might do too many other things.
I don't know how deliberate it is that we don't generate list markers in plaintext clipboard export. Since Chrome and Safari don't generate plaintext representations of the list markers, there might be some history here that I am not aware of.
Description
•