[Webkit-unassigned] [Bug 184550] New: [Attachment Support] WebEditingDelegate's shouldInsertNode cannot access dragged file content

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 12 11:29:47 PDT 2018


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

            Bug ID: 184550
           Summary: [Attachment Support] WebEditingDelegate's
                    shouldInsertNode cannot access dragged file content
           Product: WebKit
           Version: Safari 11
          Hardware: Macintosh
                OS: macOS 10.13
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML Editing
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: jonathan at e3software.com
                CC: wenson_hsieh at apple.com

Starting in macOS 10.13.4, the "node" parameter that is passed to -[WebEditingDelegate webView:shouldInsertNode:replacingDOMRange:givenAction:] when a file is dragged from the Finder and dropped into a contenteditable area contains zero children (same is true for an image dragged from Safari). This makes it very difficult for the client to figure out if the user has dropped a file attachment (or image) into the document, which it may need to know in order to import/access that file's data. Prior to macOS 10.13.4, the "node" parameter would include one or more <ATTACHMENT> child nodes that we could use as a strong hint that the user had dropped N file attachments or images (that we could then import off the pasteboard). This behavior is now hidden behind the Apple-private -[WebPreferences setAttachmentElementEnabled:] method.

It would be really helpful if WebKit1 clients had some way of being notified that an attachment was dropped into the document, with some way to access/import the dropped data. I can see that support for this is coming along nicely under WK2 (albeit as SPI), but there are still WK1 clients around like us who are finding it more and more difficult to handle situations like these, especially as the behavior has changed quite a bit from 10.10 -> 10.11 -> 10.12 -> 10.13. Thanks so much for your consideration.

Note: the above is true for copy/paste, as well.

-- 
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/20180412/efa12756/attachment-0002.html>


More information about the webkit-unassigned mailing list