mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 10:00:13 +01:00
This commit is contained in:
parent
0205a3dc27
commit
f7f875e1b3
2 changed files with 20 additions and 1 deletions
|
|
@ -23,6 +23,8 @@ import {showMessage} from "../dialog/message";
|
|||
import {openFileById, updatePanelByEditor} from "../editor/util";
|
||||
import {scrollCenter} from "../util/highlightById";
|
||||
import {getAllModels} from "./getAll";
|
||||
import {fetchPost} from "../util/fetch";
|
||||
import {onGet} from "../protyle/util/onGet";
|
||||
|
||||
export class Wnd {
|
||||
public id: string;
|
||||
|
|
@ -337,6 +339,22 @@ export class Wnd {
|
|||
if (update) {
|
||||
updatePanelByEditor(currentTab.model.editor.protyle, true, pushBack);
|
||||
}
|
||||
|
||||
// 切换到屏幕太高的页签 https://github.com/siyuan-note/siyuan/issues/5018
|
||||
const protyle = currentTab.model.editor.protyle;
|
||||
if (!protyle.scroll.element.classList.contains("fn__none") &&
|
||||
protyle.wysiwyg.element.lastElementChild.getAttribute("data-eof") !== "true" &&
|
||||
protyle.contentElement.scrollHeight > 0 &&
|
||||
protyle.contentElement.scrollHeight <= protyle.contentElement.clientHeight) {
|
||||
fetchPost("/api/filetree/getDoc", {
|
||||
id: protyle.wysiwyg.element.lastElementChild.getAttribute("data-node-id"),
|
||||
mode: 2,
|
||||
k: protyle.options.key || "",
|
||||
size: Constants.SIZE_GET,
|
||||
}, getResponse => {
|
||||
onGet(getResponse, protyle, [Constants.CB_GET_APPEND, Constants.CB_GET_UNCHANGEID]);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
updatePanelByEditor(undefined, false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue