-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Open
Description
In what scenarios do you need this feature?
目前 /api/ui/reloadFiletree 刷新后,失去滚动条位置,要想恢复必须如下这样,虽然可行,但无法准确知道刷新完毕时机,等待过小会失败,过大出现闪动。
function fileTreeFreshAll(delay = 300) {
const fileTreeScrollEl = document.querySelector('.sy__file > .fn__flex-1');
const scrollTop = fileTreeScrollEl.scrollTop;
await requestApi('/api/ui/reloadFiletree');
setTimeout(()=>{
const fileTreeScrollEl = document.querySelector('.sy__file > .fn__flex-1');
fileTreeScrollEl.scrollTop = scrollTop;
}, delay);
}
Describe the optimal solution
期望可有在刷新完成后自动恢复
Describe the candidate solution
No response
Other information
No response
Metadata
Metadata
Assignees
Labels
No labels