facebookarchive / draft-js

A React framework for building text editors.
https://draftjs.org/
MIT License
22.56k stars 2.64k forks source link

`handlePastedFiles` is not triggered pasting images from some webpages. #1945

Open felipeguizar-natgeo opened 5 years ago

felipeguizar-natgeo commented 5 years ago

Do you want to request a feature or report a bug? Bug

What is the current behavior? When trying to paste images sometimes the hook handlePastedFiles is not triggered, the hook handlePastedText is triggered instead.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. You can use this jsfiddle to get started: https://jsfiddle.net/stopachka/m6z0xn4r/.

What is the expected behavior? The handlePastedFiles hook should be triggered like if you copy and paste and image directly from your file system using a file chooser.

Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?

juanlanus commented 5 years ago

Sorry if my comment is too naive, but, can't be this caused by the difference in the way Windows handles copy-paste as compared with UNIX descendants?