{{ message }}
Repository navigation
Commit a8a35b1
fix(virtual-core): notify synchronously after above-viewport resize compensation
`resizeItem` writes `scrollTop` synchronously inside the ResizeObserver
callback to compensate for an above-viewport size change, but then notified
asynchronously. The browser could paint one frame with the new `scrollTop`
and the old item transforms, so the viewport visibly jumped by the resize
delta and snapped back on the next commit (#1227) — the scrollbar stayed
anchored (skew=0) but the content flashed.
When a compensation actually moves the scroll position, notify synchronously
so the transform commit lands in the same paint as the scroll write. Resizes
that move nothing (below-fold measurements) and iOS-deferred adjustments keep
the cheaper async notify. `applyScrollAdjustment` now reports whether it wrote
`scrollTop` this tick to drive that decision.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent ef6e92a commit a8a35b1
3 files changed
Lines changed: 84 additions & 6 deletions
File tree
- .changeset
- packages/virtual-core
- src
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
423 | | - | |
| 423 | + | |
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
| |||
679 | 679 | | |
680 | 680 | | |
681 | 681 | | |
682 | | - | |
683 | | - | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
684 | 691 | | |
685 | 692 | | |
686 | 693 | | |
| |||
691 | 698 | | |
692 | 699 | | |
693 | 700 | | |
| 701 | + | |
694 | 702 | | |
695 | 703 | | |
696 | 704 | | |
| |||
716 | 724 | | |
717 | 725 | | |
718 | 726 | | |
| 727 | + | |
719 | 728 | | |
720 | 729 | | |
721 | 730 | | |
| |||
1599 | 1608 | | |
1600 | 1609 | | |
1601 | 1610 | | |
| 1611 | + | |
1602 | 1612 | | |
1603 | | - | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
1604 | 1616 | | |
1605 | | - | |
| 1617 | + | |
1606 | 1618 | | |
1607 | 1619 | | |
1608 | | - | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
1609 | 1631 | | |
1610 | 1632 | | |
1611 | 1633 | | |
| |||

0 commit comments