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.js CHANGED
@@ -2102,7 +2102,10 @@ function PopPortal({ anchor, width = 250, estHeight = 300, className, children,
2102
2102
  const boxRef = useRef7(null);
2103
2103
  useEffect8(() => {
2104
2104
  if (!onClose) return void 0;
2105
- const close = () => onClose();
2105
+ const close = (e) => {
2106
+ if (e?.type === "scroll" && boxRef.current && e.target instanceof Node && boxRef.current.contains(e.target)) return;
2107
+ onClose();
2108
+ };
2106
2109
  const onDown = (e) => {
2107
2110
  if (boxRef.current && boxRef.current.contains(e.target)) return;
2108
2111
  if (anchor && e.clientX >= anchor.left && e.clientX <= anchor.right && e.clientY >= anchor.top && e.clientY <= anchor.bottom) return;