Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Scrolling up in Lit example stutters and resets scroll

未關閉
#981 1 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
typescript

研究方向

從 issue 中連結的 Lit 動態範例開始,透過縮短產生的句子來重現問題。比較不同高度項目的捲動行為,然後檢查該範例使用的 virtualizer 路徑。完成標準是向上捲回時仍然流暢,且不會重設捲動位置。

由索引模型根據 Issue 內容生成。

描述

Describe the bug

I was having problems with my Lit virtualizer stuttering when scrolling back up through a dynamic list and couldn't understand why the example worked, but mine did not. So I updated the height of the items in the example, and it started to break like mine. It seems the example only works well because each item takes up most of the scroll element.

Your minimal, reproducible example

https://tanstack.com/virtual/latest/docs/framework/lit/examples/dynamic?panel=sandbox

Steps to reproduce
  1. Open the Lit dynamic example: https://tanstack.com/virtual/latest/docs/framework/lit/examples/dynamic?panel=sandbox
  2. Change the lorem ipsum generator to make shorter sentences ex. faker.lorem.sentence(randomNumber(1, 20))
  3. Scroll down a ways and then scroll back up. It will start stuttering and reseting scroll. This gets worse the larger the difference in height between items.
Expected behavior

There should not be any stutter.

How often does this bug happen?

Often

Screenshots or Videos

No response

Platform
  • OS: Mac
  • Browser: Chrome
tanstack-virtual version

v3

TypeScript version

No response

Additional context

No response

Terms & Code of Conduct
  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
主要語言
TypeScript
星號
7.2k
分支
479
平均合併
21 小時 1 分鐘
30 天內合併 PR
41

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

TanStack/virtual 的其他 Issue

查看 TanStack/virtual 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。