diff --git a/app/src/assets/scss/protyle/_wysiwyg.scss b/app/src/assets/scss/protyle/_wysiwyg.scss index 5f77ceb4d..7679b89a8 100644 --- a/app/src/assets/scss/protyle/_wysiwyg.scss +++ b/app/src/assets/scss/protyle/_wysiwyg.scss @@ -3,8 +3,8 @@ cursor: text; display: flex; flex-direction: column; - box-sizing: border-box; + user-select: auto; .protyle-breadcrumb__bar { font-size: 14px; diff --git a/app/src/editor/util.ts b/app/src/editor/util.ts index 8675da269..a2953a1c6 100644 --- a/app/src/editor/util.ts +++ b/app/src/editor/util.ts @@ -484,7 +484,9 @@ export const updatePanelByEditor = (options: { ) { return; } - title = options.protyle.title.editElement.textContent; + if (options.protyle.title) { + title = options.protyle.title.editElement.textContent; + } if (options.resize) { resize(options.protyle); } diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index dc9ae5d19..c8e52af1c 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -949,7 +949,7 @@ export class WYSIWYG { // 三击选中段落块时,rangeEnd 会在下一个块 if ((range.endContainer as HTMLElement).classList.contains("protyle-attr")) { // 三击在悬浮层中会选择到 attr https://github.com/siyuan-note/siyuan/issues/4636 - range.setEndAfter(range.endContainer.previousSibling.lastChild); + setLastNodeRange((range.endContainer as HTMLElement).previousElementSibling, range, false); } } else { endBlockElement = hasClosestBlock(range.endContainer); @@ -1954,7 +1954,6 @@ export class WYSIWYG { /// #if !MOBILE if (newRange.toString().replace(Constants.ZWSP, "") !== "") { protyle.toolbar.render(protyle, newRange); - } else { hideElements(["toolbar"], protyle); }