From 05b43aa2b0f3d7b1e729775cf03faef7344c5537 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 9 May 2024 09:14:32 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/11316 --- app/src/protyle/wysiwyg/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index 168d04f2c..5926b9b2d 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -1254,7 +1254,8 @@ export class WYSIWYG { endBlockElement = hasClosestBlock(range.endContainer); } if (startBlockElement && endBlockElement && !endBlockElement.isSameNode(startBlockElement)) { - if (range.startContainer.nodeType === 1 && (range.startContainer as HTMLElement).tagName === "DIV" && (range.startContainer as HTMLElement).classList.contains("protyle-attr")) { + if ((range.startContainer.nodeType === 1 && (range.startContainer as HTMLElement).tagName === "DIV" && (range.startContainer as HTMLElement).classList.contains("protyle-attr")) || + event.clientY > mouseUpEvent.clientY) { setFirstNodeRange(getContenteditableElement(endBlockElement), range); } else if (range.endOffset === 0 && range.endContainer.nodeType === 1 && (range.endContainer as HTMLElement).tagName === "DIV") { setLastNodeRange(getContenteditableElement(startBlockElement), range, false);