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>
<rdar://problem/82701564>