From 29dc4667206b58bca76f28d39fa8c4b0db040d66 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Thu, 25 Jun 2020 14:52:26 -0400 Subject: fixed drag and drop of text onto a text box from creating new documents --- src/client/views/nodes/formattedText/FormattedTextBox.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index cdf231985..9eaf27b42 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -1193,6 +1193,9 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp } } + ondrop = (eve: React.DragEvent) => { + eve.stopPropagation(); // drag n drop of text within text note will generate a new note if not caughst, as will dragging in from outside of Dash. + } onscrolled = (ev: React.UIEvent) => { this.layoutDoc._scrollTop = this._scrollRef.current!.scrollTop; } @@ -1281,7 +1284,9 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp } })} > -
+