mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
This commit is contained in:
parent
d241569b4c
commit
59bff8376a
3 changed files with 9 additions and 4 deletions
|
@ -46,7 +46,6 @@ export class Editor extends Model {
|
|||
},
|
||||
typewriterMode: true,
|
||||
after: (editor) => {
|
||||
editor.protyle.model = this;
|
||||
if (window.siyuan.config.readonly) {
|
||||
disabledProtyle(editor.protyle);
|
||||
}
|
||||
|
@ -63,5 +62,6 @@ export class Editor extends Model {
|
|||
}
|
||||
},
|
||||
});
|
||||
this.editor.protyle.model = this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,8 +104,13 @@ class Protyle {
|
|||
}
|
||||
break;
|
||||
case "rename":
|
||||
if (this.protyle.path === data.data.path && this.protyle.model) {
|
||||
this.protyle.model.parent.updateTitle(data.data.title);
|
||||
if (this.protyle.path === data.data.path) {
|
||||
if (this.protyle.model) {
|
||||
this.protyle.model.parent.updateTitle(data.data.title);
|
||||
}
|
||||
if (this.protyle.background) {
|
||||
this.protyle.background.ial.title = data.data.title
|
||||
}
|
||||
}
|
||||
if (this.protyle.options.render.title && this.protyle.block.parentID === data.data.id) {
|
||||
if (getSelection().rangeCount > 0 && this.protyle.element.contains(getSelection().getRangeAt(0).startContainer)) {
|
||||
|
|
|
@ -206,7 +206,7 @@ const setHTML = (options: { content: string, action?: string[] }, protyle: IProt
|
|||
if (!protyle.scroll.element.classList.contains("fn__none") &&
|
||||
protyle.wysiwyg.element.lastElementChild.getAttribute("data-eof") !== "true" &&
|
||||
protyle.contentElement.scrollHeight > 0 && // 没有激活的页签 https://github.com/siyuan-note/siyuan/issues/5255
|
||||
!options.action.includes(Constants.CB_GET_FOCUSFIRST) &&
|
||||
!options.action.includes(Constants.CB_GET_FOCUSFIRST) && // 防止 eof 为true https://github.com/siyuan-note/siyuan/issues/5291
|
||||
protyle.contentElement.scrollHeight <= protyle.contentElement.clientHeight) {
|
||||
fetchPost("/api/filetree/getDoc", {
|
||||
id: protyle.wysiwyg.element.lastElementChild.getAttribute("data-node-id"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue