Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

点击动态滚动条之后的瞬间向上滚动文档,没有正常动态加载 #14004

Open
1 task
TCOTC opened this issue Feb 2, 2025 · 0 comments
Open
1 task
Assignees

Comments

@TCOTC
Copy link
Contributor

TCOTC commented Feb 2, 2025

关联 #5630

会卡出标题和题头图:

video.webm

一个可能的解决方案:

点击动态滚动条之后的瞬间禁止文档滚动,等到滚动不会有问题了才允许滚动

以及在 onGet 执行完之后再修改 style:

fetchPost("/api/filetree/getDoc", {
    id: protyle.wysiwyg.element.firstElementChild.getAttribute("data-node-id"),
    mode: 1,
    size: window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => {
    onGet({
        data: getResponse,
        protyle,
        action: [Constants.CB_GET_BEFORE, Constants.CB_GET_UNCHANGEID],
    });
    // TODO 在 onGet 执行完之后再修改 style
    protyle.contentElement.style.overflow = "";
    protyle.contentElement.style.width = "";
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants