From c8be94244bcd094efba739e5a46034bceccea80f Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 24 Jan 2024 16:13:27 -0500 Subject: several fixes to drag/drop so that dropAction's set on target work for tree views, notetaking, formattedText, etc. make bringToFront an optional prop. --- src/client/views/nodes/formattedText/FormattedTextBox.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/client/views/nodes/formattedText/FormattedTextBox.tsx') diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index 38400d2e7..731ab1d53 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -89,6 +89,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent = React.createRef(); private _editorView: Opt; public _applyingChange: string = ''; + private _inDrop = false; private _finishingLink = false; private _searchIndex = 0; private _lastTimedMark: Mark | undefined = undefined; @@ -355,7 +356,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent; + const dropAction = dragData.dropAction || dragData.userDropAction; if ([AclEdit, AclAdmin, AclSelfEdit].includes(effectiveAcl)) { // replace text contents when dragging with Alt if (de.altKey) { @@ -582,7 +584,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent