virtual-core: a clamp retry can overwrite a scroll command and ignores _canWriteScroll()
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- react, typescript
- Lĩnh vực
- frontend, performance
Hướng nghiên cứu
Start in the virtual-core scroll write path: _retryClampedAdjustment, _canWriteScroll, _startScroll, _writeAwaitingCommand, and the _willUpdate and resizeItem calls that grow the sizer. Reproduce the case where a clamped retry at { target: 4850, maxAtWrite: 4800 } fires after a scrollToIndex write to 550. Done when a command's target is never overwritten by a retry, the retry respects _canWriteScroll(), and tests cover desktop and the iOS 27 tail timer.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
_retryClampedAdjustment repeats a compensation write that the browser clamped because the sizer was not big enough yet (#1258). It has two problems.
1. The retry can overwrite a scroll command
- A hold flush or a compensation write is clamped. The virtualizer records a retry, for example
{ target: 4850, maxAtWrite: 4800 }. - A scroll command writes. For example,
scrollToIndexwrites 550. _willUpdateorresizeItemruns before the command's read-back. The sizer is now bigger, so the retry writes 4850.
The scroll position is 4850, not the target of the command.
- This occurs on desktop and on iOS.
- On iOS 27 it occurs more often. The tail timer flushes the hold and then writes a queued command in the same task.
- It occurs only with adapters whose
notifydoes not grow the sizer synchronously. The React adapter grows it synchronously. - #1324 fixed this for a queued command:
_writeAwaitingCommandclears the retry. Other commands still have the problem.
2. The retry ignores _canWriteScroll()
The retry can write during the iOS touch tail or under a finger that drags. iOS ignores a write under a finger. On iOS 26 and earlier, a write during the tail stops the momentum.
Possible fix
- Clear
_clampedAdjustmentwhen a command starts (_startScroll), or skip the retry whilescrollState !== null. - In
_retryClampedAdjustment, return early when_canWriteScroll()is false. Keep the record for the next opportunity. - Add tests for desktop and for the iOS 27 tail timer.
Found during the review of #1324. Related: #1258, #1307.
- Ngôn ngữ chính
- TypeScript
- Star
- 7.1k
- Fork
- 472
- Merge trung bình
- 1 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 31
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TanStack/virtual
-
anchorTo: 'end' loses the end when the scroll element shrinksCó thể đã có người làm @langleyd đã nhận 9 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
marko-virtual: scrollToEnd during an in-flight prepend strands the view one prepend above the bottom (chat-pretext e2e fails on CI)Có thể đã có người làm @prayaggaikwad96 đã nhận 3 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
TanStack/virtual#1252 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
lit-virtual: VirtualizerController never applies updated options after constructionCó thể đã có người làm @waterWang đã nhận 65 ngày trước. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Dynamic sizes lit demo crashes/ loads very slowlyCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
TanStack/virtual#1188 · 11 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của TanStack/virtual
Issue tương tự
-
bnv-manager-v2: accept_invite creates the Mailcow domain admin before the commitCó thể đã có người làm @myOmikron đã nhận hôm nay. Đang mởbug ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Windows: mio 1.2.3 named-pipe use-after-free panics the native IPC broker and hangs every toolĐang mởplatform:windows tool triaged wontfix
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
nicolettas-muggelbude/RechnungsFee#448 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Android bug feature/error-tracking react-native team/error-tracking
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
PostHog/posthog-js#5310 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày