@jsenv/navi 0.30.7 → 0.30.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -85512,10 +85512,13 @@ const useListScrollSync = ({
85512
85512
  };
85513
85513
  // Items that came in at another size than what stood in for them (a
85514
85514
  // skeleton becoming its item) leave the window short of the screen, or past
85515
- // it, and nothing scrolled to say so. Asked on the next frame, not inside
85516
- // the resize delivery: the window it frames is a render, which resizes what
85517
- // is observed once more, and the browser gives up on the loop
85518
- // ("ResizeObserver loop completed with undelivered notifications").
85515
+ // it, and nothing scrolled to say so. A held list too: its hold places it but
85516
+ // leaves the window to the screen (see holdWindow), and a placement that
85517
+ // moves nothing — a document too short to scroll — fires no scroll that
85518
+ // would size it. Asked on the next frame, not inside the resize delivery:
85519
+ // the window it frames is a render, which resizes what is observed once
85520
+ // more, and the browser gives up on the loop ("ResizeObserver loop
85521
+ // completed with undelivered notifications").
85519
85522
  const onItemsResizedRef = useRef(null);
85520
85523
  onItemsResizedRef.current = () => {
85521
85524
  settleWindow();
@@ -85679,9 +85682,7 @@ const useListScrollSync = ({
85679
85682
  const putTopItemBack = entries => {
85680
85683
  const listResized = entries.some(entry => entry.target === listEl);
85681
85684
  if (listResized) {
85682
- if (onGeometryChangeRef.current()) {
85683
- return;
85684
- }
85685
+ const placed = onGeometryChangeRef.current();
85685
85686
  cancelAnimationFrame(itemsResizedFrame);
85686
85687
  itemsResizedFrame = requestAnimationFrame(() => {
85687
85688
  if (pageLeftRef.current) {
@@ -85689,6 +85690,9 @@ const useListScrollSync = ({
85689
85690
  }
85690
85691
  onItemsResizedRef.current();
85691
85692
  });
85693
+ if (placed) {
85694
+ return;
85695
+ }
85692
85696
  }
85693
85697
  if (!entries.some(entry => entry.target === scrollerEl)) {
85694
85698
  return;