mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-21 19:41:05 +08:00
This commit is contained in:
parent
fff0504935
commit
f749a89abc
@ -360,6 +360,10 @@ ${window.siyuan.languages.createdAt} ${dayjs(response.data.ial.id.substr(0, 14))
|
|||||||
range.selectNodeContents(this.editElement);
|
range.selectNodeContents(this.editElement);
|
||||||
focusByRange(range);
|
focusByRange(range);
|
||||||
}
|
}
|
||||||
|
const loadingElement = protyle.element.querySelector(".fn__loading");
|
||||||
|
if (loadingElement) {
|
||||||
|
loadingElement.remove();
|
||||||
|
}
|
||||||
if (scrollAttr) {
|
if (scrollAttr) {
|
||||||
restoreScroll(protyle, scrollAttr === Constants.CB_GET_SCROLL ? undefined : scrollAttr);
|
restoreScroll(protyle, scrollAttr === Constants.CB_GET_SCROLL ? undefined : scrollAttr);
|
||||||
}
|
}
|
||||||
|
@ -17,10 +17,6 @@ import {preventScroll} from "../scroll/preventScroll";
|
|||||||
import {restoreScroll} from "../scroll/saveScroll";
|
import {restoreScroll} from "../scroll/saveScroll";
|
||||||
|
|
||||||
export const onGet = (data: IWebSocketData, protyle: IProtyle, action: string[] = [], scrollAttr?: string) => {
|
export const onGet = (data: IWebSocketData, protyle: IProtyle, action: string[] = [], scrollAttr?: string) => {
|
||||||
const loadingElement = protyle.element.querySelector(".fn__loading");
|
|
||||||
if (loadingElement) {
|
|
||||||
loadingElement.remove();
|
|
||||||
}
|
|
||||||
protyle.wysiwyg.element.removeAttribute("data-top");
|
protyle.wysiwyg.element.removeAttribute("data-top");
|
||||||
if (data.code === 1) {
|
if (data.code === 1) {
|
||||||
// 其他报错
|
// 其他报错
|
||||||
@ -97,8 +93,14 @@ export const onGet = (data: IWebSocketData, protyle: IProtyle, action: string[]
|
|||||||
action,
|
action,
|
||||||
}, protyle);
|
}, protyle);
|
||||||
|
|
||||||
if (scrollAttr && ((protyle.options.render.title && protyle.title.editElement.getAttribute("data-render") === "true") || !protyle.options.render.title)) {
|
if ((protyle.options.render.title && protyle.title.editElement.getAttribute("data-render") === "true") || !protyle.options.render.title) {
|
||||||
restoreScroll(protyle, scrollAttr);
|
const loadingElement = protyle.element.querySelector(".fn__loading");
|
||||||
|
if (loadingElement) {
|
||||||
|
loadingElement.remove();
|
||||||
|
}
|
||||||
|
if (scrollAttr) {
|
||||||
|
restoreScroll(protyle, scrollAttr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user