(
+
- {children}
-
-
-
+
+ {children}
+
+
+ )}
+ />
);
- // No `` here on purpose — wrapping it would reintroduce the
- // unmount-on-close that `keepMounted` exists to avoid.
+ // No `` here on purpose: the rendered popup must remain the
+ // Base UI popup element so focus and pointer interactions stay pinned to it.
if (keepMounted) {
return (
- {isOpen ? (
-
- {popup}
-
- ) : null}
-
+
+ {popup}
+
);
}