Open wereHamster opened 2 years ago
I can confirm the description of @wereHamster. Pasting an PNG image that was copied from the web, creates an beforeInputEvent.dataTransfer
with types ["text/plain", "text/html"]
and no files attached on Safari 14.1.2 while on the other browsers it does create a event.dataTransfer
with types ["text/html", "Files"]
and the pasted image file is accessible at beforeInputEvent.dataTransfer.files[0]
.
The Web Editing Working Group just discussed Encourage browser to include files in beforeinput DataTransfer event (#120)
.
Having the files available via DataTransfer of the beforeinput event (in the same way that they are available for example in the paste event) is extremely useful.
Files in DataTransfer are available in both Chrome and Firefox. WebKit is refusing to implement this feature citing essentially «it's not in the spec».
In the same spirit, browsers should include text/uri-list when appropriate given the clipboard contents.
WebKit Bugs: