virtual-core: a clamp retry can overwrite a scroll command and ignores _canWriteScroll()
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
- Ambito
- frontend, performance
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 7.1k
- Fork
- 472
- Merge medio
- 1g 4h
- PR unite (30g)
- 29
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di TanStack/virtual
-
anchorTo: 'end' loses the end when the scroll element shrinksForse già presa @langleyd l’ha presa 9 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
marko-virtual: scrollToEnd during an in-flight prepend strands the view one prepend above the bottom (chat-pretext e2e fails on CI)Forse già presa @prayaggaikwad96 l’ha presa 3 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
TanStack/virtual#1252 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
lit-virtual: VirtualizerController never applies updated options after constructionForse già presa @waterWang l’ha presa 65 giorni fa. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
-
Dynamic sizes lit demo crashes/ loads very slowlyForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
TanStack/virtual#1188 · 11 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di TanStack/virtual
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
aws/agentcore-cli#2606 ·
I maintainer di solito rispondono entro 1 giorno
-
ai-driven-qa bug Cosmetic
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
ai-driven-qa bug claude Minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
linagora/twake-mail-admin#301 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
reproduced
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
anomalyco/opencode#56038 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno