WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
229597
Content loss when copying or pasting lists with an empty first list item
https://bugs.webkit.org/show_bug.cgi?id=229597
Summary
Content loss when copying or pasting lists with an empty first list item
James Toohey
Reported
2021-08-26 17:59:16 PDT
Created
attachment 436596
[details]
A simple HTML file to replicate the bug Hi team, We discovered some cases where copying or pasting content in Safari 14 would cause content loss. Context: Google Docs uses a `b` element to wrap their content with the document id when copying content e.g. `<b id="docs-internal-guid-[uuid goes here]">`. When creating a Google Doc with an empty line or empty list item as the first element, Safari converts this element into a style and strips other elements. I have attached a very simple HTML reproduction case with the following example: Input (clipboard content): <b data-important-attr="xyz"> <ul> <li></li> <li>text</li> </ul> </b> Output (result from paste): <br> <div> <span style="font-weight: bold;">text</span> </div> Adding any content into the first list item results in the expected output: Input (clipboard content): <b data-important-attr="xyz"> <ul> <li>text</li> <li>text</li> </ul> </b> Output (result from paste): <b data-important-attr="xyz"> <ul> <li>text</li> <li>text</li> </ul> </b> It is also worth noting that this occurs even without the wrapping `b` element: Input (clipboard content): <ul> <li></li> <li>text</li> </ul> Output (result from paste): <br> <div>text</div>
Attachments
A simple HTML file to replicate the bug
(802 bytes, text/html)
2021-08-26 17:59 PDT
,
James Toohey
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-09-02 18:01:01 PDT
<
rdar://problem/82701564
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug