From 42f4aa629cd81719514f9a0b5e6a0660d0fdf94b Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Fri, 22 Jul 2016 17:04:16 -0700 Subject: [PATCH] fix to prevent being able to drag text into a void --- lib/components/content.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/components/content.js b/lib/components/content.js index 52f2524e0..889587b0e 100644 --- a/lib/components/content.js +++ b/lib/components/content.js @@ -320,6 +320,9 @@ class Content extends React.Component { isFocused: true }) + // If the target is inside a void node, abort. + if (state.document.hasVoidParent(point.key)) return + // If the drag is internal, handle it now. And it the target is after the // selection, it needs to account for the selection's content being deleted. if (this.tmp.isInternalDrag) {