Skip to content

Conversation

@Xwatson
Copy link
Collaborator

@Xwatson Xwatson commented Dec 10, 2025

  • 页面切换宽屏后滚动下方有空白
  • 编辑器宽度继承外界容器
  • 监听宽度与上次不同,清除缓存测算高度重新调用滚动计算一次

if (!this.virtualConfig?.enabled) {
return;
}
if (entries.length > 0 && entries[0].contentRect.width !== editorResizeObserverRectWidth) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议这里考虑初始调用问题,就是页面初始化后首先调用一次么

if (entries.length > 0 && entries[0].contentRect.width !== editorResizeObserverRectWidth) {
editorResizeObserverRectWidth = entries[0].contentRect.width;
this.measuredHeights.clear();
this.doVirtualScroll();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我的意思这里是不是不需要调用,外面 theia 会再触发?

@pubuzhixing8 pubuzhixing8 merged commit 54bd3f7 into virtual-scroll Dec 10, 2025
1 check passed
@pubuzhixing8 pubuzhixing8 deleted the xws/#WIK-19556 branch December 10, 2025 11:22
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

Successfully merging this pull request may close these issues.

3 participants