[Webkit-unassigned] [Bug 252240] New: Unable to paste "text/html" content written via Clipboard API write() with formatting preserved

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 14 07:10:01 PST 2023


https://bugs.webkit.org/show_bug.cgi?id=252240

            Bug ID: 252240
           Summary: Unable to paste "text/html" content written via
                    Clipboard API write() with formatting preserved
           Product: WebKit
           Version: Safari 16
          Hardware: iPhone / iPad
                OS: iOS 16
            Status: NEW
          Severity: Major
          Priority: P2
         Component: UI Events
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: kobernykbeljr at gmail.com

I'm using Async Clipboard API (https://webkit.org/blog/10855/async-clipboard-api/) to copy an html string to the clipboard with text/html formatting. However, the HTML formatting is not provided when I paste the content into Pages and Notes applications on iOS devices.
In contrast, HTML string is formatted as expected on Mac (Apple Silicon) within Pages and Notes applications. As well content is pasted as expected in Office 365 apps on iOS devices.

Please find a sample of Clipboard API utilization here: https://codepen.io/YuryKB/pen/yLqjKOo?editors=0011
To verify how it works on iOS devices I've been using a full-page mode: https://cdpn.io/YuryKB/fullpage/yLqjKOo?nocache=true&view=fullpage

The sample above copies a caption on top of the page and allows displaying what is the result value of async write() and execCommand('copy') written to the clipboard.

In addition! Pasting the HTML string copied with a document.execCommand('copy') and the native 'Copy' option from the context menu works perfectly. It pastes the content into Pages and Notes in the desired way.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230214/075b3242/attachment-0001.htm>


More information about the webkit-unassigned mailing list