mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-28 18:00:15 +01:00
This commit is contained in:
parent
e451114004
commit
54c657e4a9
1 changed files with 4 additions and 5 deletions
|
|
@ -1751,11 +1751,10 @@ export class WYSIWYG {
|
|||
}
|
||||
if (selectElement.length > 0) {
|
||||
range.collapse(true);
|
||||
if (range.commonAncestorContainer.nodeType === 1 &&
|
||||
range.startContainer.childNodes[range.startOffset] &&
|
||||
range.startContainer.childNodes[range.startOffset].nodeType === 1 &&
|
||||
(range.commonAncestorContainer as HTMLElement).classList.contains("protyle-wysiwyg")) {
|
||||
focusBlock(range.startContainer.childNodes[range.startOffset] as Element);
|
||||
// https://github.com/siyuan-note/siyuan/issues/17092 & https://github.com/siyuan-note/siyuan/issues/15296
|
||||
const endElement = hasClosestBlock(mouseUpEvent.target as HTMLElement);
|
||||
if (endElement && document.activeElement.classList.contains("protyle-wysiwyg")) {
|
||||
focusBlock(endElement);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue