From 42513e0d6fd07344625aff1477c84092dac93cac Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 6 Jun 2022 10:42:05 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/5104 --- app/src/protyle/util/editorCommonEvent.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.ts index 9d47ecfde..560fe9f6c 100644 --- a/app/src/protyle/util/editorCommonEvent.ts +++ b/app/src/protyle/util/editorCommonEvent.ts @@ -560,7 +560,12 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => { return; } if (target.classList && target.classList.contains("protyle-action")) { - window.siyuan.dragElement = target.parentElement; + if (hasClosestByClassName(target, "protyle-wysiwyg__embed")) { + window.siyuan.dragElement = undefined; + event.preventDefault(); + } else { + window.siyuan.dragElement = target.parentElement; + } return; } // 选中编辑器中的文字进行拖拽