slate-drop-or-paste-image breaks default drag&drop
SynnaxCrab opened this issue · 2 comments
SynnaxCrab commented
Do you want to request a feature or report a bug?
Bug
What's the current behavior?
uncaught TypeError: Failed to execute 'readAsDataURL' on 'FileReader': parameter 1 is not of type 'Blob'.
at Image.load (build.prod.js:582)
at Image.componentDidMount (build.prod.js:571)
at CallbackQueue.notifyAll (build.prod.js:17008)
at ReactReconcileTransaction.close (build.prod.js:26887)
at ReactReconcileTransaction.closeAll (build.prod.js:29742)
at ReactReconcileTransaction.perform (build.prod.js:29689)
at ReactUpdatesFlushTransaction.perform (build.prod.js:29676)
at ReactUpdatesFlushTransaction.perform (build.prod.js:27796)
at Object.flushBatchedUpdates (build.prod.js:27879)
at ReactDefaultBatchingStrategyTransaction.closeAll (build.prod.js:29742)
What's the expected behavior?
drag and drop should work by default.
yanndavin commented
Facing the same issue I've committed a simple fix which is may be not optimal (splitted blocks created during the first image copy are not merged after the drag & drop) but seems to fix the problem for simple cases. Hope this helps
https://github.com/yanndavin/slate-plugins/commit/03d44de28e40b5928216e06e8516afc3f4e01e88
willbryk720 commented
Has there been any update on this? Is there a way to know when you are dragging within the doc as opposed to dragging from outside it