reifyui 0.8.0 → 0.8.2

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.
package/dist/index.cjs CHANGED
@@ -2333,7 +2333,10 @@ function PopPortal({ anchor, width = 250, estHeight = 300, className, children,
2333
2333
  const boxRef = (0, import_react15.useRef)(null);
2334
2334
  (0, import_react15.useEffect)(() => {
2335
2335
  if (!onClose) return void 0;
2336
- const close = () => onClose();
2336
+ const close = (e) => {
2337
+ if (e?.type === "scroll" && boxRef.current && e.target instanceof Node && boxRef.current.contains(e.target)) return;
2338
+ onClose();
2339
+ };
2337
2340
  const onDown = (e) => {
2338
2341
  if (boxRef.current && boxRef.current.contains(e.target)) return;
2339
2342
  if (anchor && e.clientX >= anchor.left && e.clientX <= anchor.right && e.clientY >= anchor.top && e.clientY <= anchor.bottom) return;