I am dragging and dropping image-, video and slideshow-objects into the draft-js editor. To give the drop handler the information he needs to insert that object i am serializing a data object into the DataTransfer object. That's why i do not need the text-property of the DataTransfer object. If there is no text-property set on the DataTransfer object, draft-js raises an error:
Uncaught TypeError: Cannot read property 'length' of null
insertTextIntoContentState
replaceText
insertText
insertTextAtSelection
onDrop
...
Is there a way to avoid this error if i do not want to insert any text and handle the drop action by myself? Or is this a bug?
I think it would be reasonable to only call this.update() here if data.getText() returns non-null:
I have also encountered this while using Draft+react-dnd

Any progress on this?
@delijah this quick fix solves the problem for a while.
https://github.com/facebook/draft-js/pull/864/commits/62ff707f73bb92716292df60e2d34cdb1ab656b0 as @spicyj recommended.
Closing because of inactivity.
does this need a PR? still running into this...
Still running into this as well with react-dnd-enabled blocks
NOTE: if you're using the <Editor /> component from draft-js-plugins-editor you'll have to explicitly return 'handled' instead of true for this to work
I am still seeing this error - is there a timeline for that commit being merged?
Since people still get this error and would like to see it fixed, i reopen this issue hereby.
I am still seeing this error as well - I would love to see the fix implemented. Need a PR?
This should be fixed by #2117. Please reopen if you believe this is not addressed @delijah
Most helpful comment
@delijah this quick fix solves the problem for a while.
https://github.com/facebook/draft-js/pull/864/commits/62ff707f73bb92716292df60e2d34cdb1ab656b0 as @spicyj recommended.