Vanessa 2025-03-15 18:13:01 +08:00
parent 90a8e679b3
commit c845e0acd9
4 changed files with 13 additions and 4 deletions

View file

@ -1580,7 +1580,7 @@ export class WYSIWYG {
} else if (range.toString() !== "" && startContainer.isSameNode(range.endContainer) &&
range.startContainer.nodeType === 3 &&
// 需使用 wholeText https://github.com/siyuan-note/siyuan/issues/14339
range.endOffset === range.endContainer.wholeText.length &&
range.endOffset === (range.endContainer as Text).wholeText.length &&
range.startOffset === 0 &&
!["DIV", "TD", "TH", "TR"].includes(range.startContainer.parentElement.tagName)) {
// 选中整个内联元素

View file

@ -1248,7 +1248,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
protyle.hint.enableExtend = false;
} else if (!window.siyuan.menus.menu.element.classList.contains("fn__none")) {
// 防止 ESC 时选中当前块
window.siyuan.menus.menu.remove();
window.siyuan.menus.menu.remove(true);
} else if (nodeElement.classList.contains("protyle-wysiwyg--select")) {
hideElements(["select"], protyle);
countBlockWord([], protyle.block.rootID);