virtual-core: a clamp retry can overwrite a scroll command and ignores _canWriteScroll()
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- react, typescript
- Bereich
- frontend, performance
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 7.2k
- Forks
- 479
- Ø Merge
- 1 T. 2 Std.
- Gemergte PRs (30 T.)
- 34
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus TanStack/virtual
-
scrollMargin is ignored when deciding the viewport is at the endEvtl. vergeben @KooYS hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 25/100
Maintainer antworten meist innerhalb von 1 Tag
-
anchorTo: 'end' loses the end when the scroll element shrinksEvtl. vergeben @langleyd hat das vor 18 Tagen übernommen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
marko-virtual: scrollToEnd during an in-flight prepend strands the view one prepend above the bottom (chat-pretext e2e fails on CI)Evtl. vergeben @prayaggaikwad96 hat das vor 12 Tagen übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 42/100
TanStack/virtual#1252 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
lit-virtual: VirtualizerController never applies updated options after constructionEvtl. vergeben @itisrmk hat das vor 5 Tagen übernommen. Offen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 45/100
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in TanStack/virtual
Ähnliche Issues
-
bug require-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
expressjs/expressjs.com#2549 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
umami-software/umami#4686 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
[Bug]: Device screenshot fails with 500 on iPhone Duo (Xcode 27.2): serve-sim calls simctl without --displayEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
pingdotgg/t3code#24900 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
inu-appcenter/UNIDorm-web#411 ·
Maintainer antworten meist innerhalb von 1 Tag
-
🐛 bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 2 Tagen