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);