virtua 0.44.2 → 0.44.3

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.
@@ -735,14 +735,14 @@ const createScroller = (store, isHorizontal) => {
735
735
  // https://github.com/inokawa/virtua/issues/590
736
736
  microtask(async () => {
737
737
  while (true) {
738
- let measuring = false;
738
+ let done = true;
739
739
  for (let [i, end] = store.$getRange(); i <= end; i++) {
740
740
  if (store.$isUnmeasuredItem(i)) {
741
- measuring = true;
741
+ done = false;
742
742
  break;
743
743
  }
744
744
  }
745
- if (!measuring) {
745
+ if (done) {
746
746
  break;
747
747
  }
748
748
  const [promise, unsubscribe] = waitForMeasurement();
@@ -910,14 +910,14 @@ const createWindowScroller = (store, isHorizontal) => {
910
910
  // https://github.com/inokawa/virtua/issues/590
911
911
  microtask(async () => {
912
912
  while (true) {
913
- let measuring = false;
913
+ let done = true;
914
914
  for (let [i, end] = store.$getRange(); i <= end; i++) {
915
915
  if (store.$isUnmeasuredItem(i)) {
916
- measuring = true;
916
+ done = false;
917
917
  break;
918
918
  }
919
919
  }
920
- if (!measuring) {
920
+ if (done) {
921
921
  break;
922
922
  }
923
923
  const [promise, unsubscribe] = waitForMeasurement();
@@ -1458,7 +1458,7 @@ const Virtualizer = (props) => {
1458
1458
  return (<ListItem _as={props.item} _index={index()} _resizer={resizer.$observeItem} _offset={offset()} _hide={hide()} _children={children()} _isHorizontal={horizontal}/>);
1459
1459
  };
1460
1460
  return (<Dynamic component={props.as} ref={containerRef} style={{
1461
- contain: "strict",
1461
+ contain: "size paint style", // https://github.com/inokawa/virtua/pull/775
1462
1462
  "overflow-anchor": "none", // opt out browser's scroll anchoring because it will conflict to scroll anchoring of virtualizer
1463
1463
  overflow: "clip", // https://github.com/inokawa/virtua/pull/485 https://github.com/inokawa/virtua/issues/717
1464
1464
  flex: "none", // flex style can break layout
@@ -1590,7 +1590,7 @@ const WindowVirtualizer = (props) => {
1590
1590
  return items;
1591
1591
  });
1592
1592
  return (<div ref={containerRef} style={{
1593
- contain: "strict",
1593
+ contain: "size paint style", // https://github.com/inokawa/virtua/pull/775
1594
1594
  "overflow-anchor": "none", // opt out browser's scroll anchoring because it will conflict to scroll anchoring of virtualizer
1595
1595
  overflow: "clip", // https://github.com/inokawa/virtua/pull/485 https://github.com/inokawa/virtua/issues/717
1596
1596
  flex: "none", // flex style can break layout