From fe827792fddc8fbbc32be6a3bcc25f38508a2381 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 11 Oct 2022 20:32:39 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/6153 --- app/src/protyle/util/editorCommonEvent.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.ts index bb540976c..4199fbd42 100644 --- a/app/src/protyle/util/editorCommonEvent.ts +++ b/app/src/protyle/util/editorCommonEvent.ts @@ -308,8 +308,7 @@ const dragSame = (protyle: IProtyle, sourceElements: Element[], targetElement: E topSourceElement = getTopAloneElement(item); if (topSourceElement.isSameNode(item)) { topSourceElement = undefined; - } - if (topSourceElement.contains(item) && topSourceElement.contains(targetElement)) { + } else if (topSourceElement.contains(item) && topSourceElement.contains(targetElement)) { // * * 1 列表项拖拽到父级列表项下 https://ld246.com/article/1665448570858 topSourceElement = targetElement; } @@ -384,8 +383,7 @@ const dragSame = (protyle: IProtyle, sourceElements: Element[], targetElement: E topSourceElement = getTopAloneElement(item); if (topSourceElement.isSameNode(item)) { topSourceElement = undefined; - } - if (topSourceElement.contains(item) && topSourceElement.contains(targetElement)) { + } else if (topSourceElement.contains(item) && topSourceElement.contains(targetElement)) { // * * 1 列表项拖拽到父级列表项上 https://ld246.com/article/1665448570858 topSourceElement = targetElement; }