anchorTo: 'end' loses the end when the scroll element shrinks
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Start in packages/virtual-core where anchorTo: 'end' scroll adjustments and the resize handling live, and compare how an item growing is compensated versus how scroll-element size changes are handled. Reproduce using the chat e2e page in packages/react-virtual/e2e/app/chat/main.tsx on branch langleyd/virtual:fix/end-anchor-scroll-element-resize, which has a control that shrinks the container. Done means an end-pinned viewport stays pinned after the container shrinks, verified by the existing e2e suite plus a new case for container resize.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
With anchorTo: 'end', a viewport pinned to the end stays pinned when the last item grows, but not when the scroll element itself gets shorter, for example when the window is resized or the app changes the element's height. The browser keeps scrollTop, so the newest items end up below the fold by the amount the element shrank.
In a chat application this be an element being displayed on the page(say a banner above or below the scroll element) that causes the scroll element to shrink. The effect being the users losing the their place and not seeing the most recent message.
Your minimal, reproducible example
The chat e2e page on langleyd/virtual, branch fix/end-anchor-scroll-element-resize, has a control that shrinks the scroll container: packages/react-virtual/e2e/app/chat/main.tsx.
Steps to reproduce
- Render an end-anchored list and scroll to the end.
- Reduce the scroll element's height, or resize the window when it is sized from the viewport.
- The last items are now below the fold.
Expected behavior
An end-pinned viewport stays pinned to the end, as it does when an item grows.
How often does this bug happen?
Every time
Screenshots or Videos
Currently
https://github.com/user-attachments/assets/d420fad5-7bef-426e-9d10-f72125c80fbf
Expected
https://github.com/user-attachments/assets/58152695-83aa-4da8-9e49-12c422de0499
Platform
any browser. Seen in Chrome on macOS.
tanstack-virtual version
3.17.11
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 7.1k
- Fork
- 472
- Merge trung bình
- 1 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 11
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
-
measureElement caches 0 size for nodes that aren't attached yet (Vue: rows stack at start 0 and the list scrolls away on mount)Có thể đã có người làm @webn00b đã nhận 11 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`scrollToIndex(last, { align: 'end' })` stays short of the end after a measured row grows (virtual-core ≥ 3.17.0)Có thể đã có người làm @minwookshin đã nhận 9 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
TanStack/virtual#1290 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
virtual-core: desktop Safari drops the prepend anchor write when history lands during the top rubber-band bounceCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/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 62/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ể 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 55/100
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ự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
kind/chore priority/must
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
sidereal-io/sidereal#380 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Mend: dependency security vulnerability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
opfab/operatorfabric-core#10653 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
backend bug size:sm
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
chrisbenincasa/tunarr#2237 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 69/100
Lam30ne/regulate-app#39 ·