mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Merge W1r2: drop redundant post-correction re-baseline (dawn/webkit-compensation @ c9e5bf3c)
Co-authored-by: Tyler Longwell <tlongwell@block.xyz> Signed-off-by: Tyler Longwell <tlongwell@block.xyz> * origin/dawn/webkit-compensation: fix(desktop): drop redundant post-correction re-baseline (single-writer)
This commit is contained in:
co-authored by
Tyler Longwell
commit
3d1e91ea03
@@ -704,9 +704,10 @@ export function useAnchoredScroll({
|
|||||||
});
|
});
|
||||||
if (target !== null) {
|
if (target !== null) {
|
||||||
container.scrollTo({ top: target, behavior: "auto" });
|
container.scrollTo({ top: target, behavior: "auto" });
|
||||||
// Re-baseline after the correction so the next RO batch measures shift
|
// No re-baseline here: the rAF loop is the single writer of
|
||||||
// from where we just pinned, not the pre-correction position.
|
// `readingAnchorRef` and re-snapshots from live geometry next frame
|
||||||
readingAnchorRef.current = snapshotReadingAnchor(container);
|
// (~16ms), which already reflects this correction. Writing it here too
|
||||||
|
// would make the "single writer" invariant a lie for no gain.
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Observe every timeline row (not the content wrapper): a
|
// Observe every timeline row (not the content wrapper): a
|
||||||
|
|||||||
Reference in New Issue
Block a user