Skip to content

Improve dynamic loading #14004

Closed
Closed
@TCOTC

Description

@TCOTC

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

关联 #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 = "";
});

Activity

added a commit that references this issue on Feb 19, 2025
modified the milestones: 3.1.24, 3.1.23 on Feb 19, 2025
changed the title [-]点击动态滚动条之后的瞬间向上滚动文档,没有正常动态加载[/-] [+]Improve dynamic loading[/+] on Feb 19, 2025
TCOTC

TCOTC commented on Feb 19, 2025

@TCOTC
ContributorAuthor

感觉区别不大,还是会卡出标题和题头图:

video.webm
added a commit that references this issue on Feb 20, 2025
TCOTC

TCOTC commented on Feb 20, 2025

@TCOTC
ContributorAuthor

在滚动条上滚动的话能卡出来一瞬间:

video.webm
Vanessa219

Vanessa219 commented on Feb 21, 2025

@Vanessa219
Member

这个不能阻止,否则正常滚动就会卡顿。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @Vanessa219@TCOTC

      Issue actions

        Improve dynamic loading · Issue #14004 · siyuan-note/siyuan