From bc5cc47f2b68ef29358e4999c226ed57f0ca4b7b Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 16 Dec 2023 23:12:10 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/9900 --- app/src/protyle/util/editorCommonEvent.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.ts index 46151bf9f..c9620f434 100644 --- a/app/src/protyle/util/editorCommonEvent.ts +++ b/app/src/protyle/util/editorCommonEvent.ts @@ -962,6 +962,7 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => { blockRender(protyle, targetElement); } } + dragoverElement = undefined; } } else if (event.dataTransfer.getData(Constants.SIYUAN_DROP_FILE)?.split("-").length > 1 && targetElement && !protyle.options.backlinkData && targetElement.className.indexOf("dragover__") > -1) { @@ -1117,7 +1118,7 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => { } else if (contentRect) { const editorPosition = { left: contentRect.left + parseInt(editorElement.style.paddingLeft), - right: contentRect.right - parseInt(editorElement.style.paddingRight) + right: contentRect.left + protyle.contentElement.clientWidth - parseInt(editorElement.style.paddingRight) }; if (event.clientX < editorPosition.left) { // 左侧