mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-07 09:18:49 +01:00
This commit is contained in:
parent
3007364309
commit
99151601a5
1 changed files with 13 additions and 1 deletions
|
|
@ -117,7 +117,6 @@ const setHTML = (options: { content: string, action?: string[] }, protyle: IProt
|
|||
if (protyle.options.render.scroll) {
|
||||
protyle.scroll.update(protyle.block.blockCount, protyle);
|
||||
}
|
||||
|
||||
if (options.action.includes(Constants.CB_GET_HL)) {
|
||||
preventScroll(protyle); // 搜索页签滚动会导致再次请求
|
||||
const hlElement = highlightById(protyle, protyle.block.id, true);
|
||||
|
|
@ -179,6 +178,19 @@ const setHTML = (options: { content: string, action?: string[] }, protyle: IProt
|
|||
if (protyle.element.classList.contains("block__edit") && (protyle.element.nextElementSibling || protyle.element.previousElementSibling)) {
|
||||
protyle.element.style.minHeight = Math.min(30 + protyle.wysiwyg.element.clientHeight - 16, window.innerHeight / 3) + "px";
|
||||
}
|
||||
// https://github.com/siyuan-note/siyuan/issues/5018
|
||||
if (!protyle.scroll.element.classList.contains("fn__none") &&
|
||||
protyle.wysiwyg.element.lastElementChild.getAttribute("data-eof") !== "true" &&
|
||||
protyle.wysiwyg.element.clientHeight < 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]);
|
||||
});
|
||||
}
|
||||
if (options.action.includes(Constants.CB_GET_APPEND) || options.action.includes(Constants.CB_GET_BEFORE)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue