We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
FloatingUI
1 parent 9350b3d commit b0c19c2Copy full SHA for b0c19c2
lib/components/Floating.tsx
@@ -156,10 +156,10 @@ export function Floating(props: Props) {
156
const dismiss = useDismiss(context, {
157
ancestorScroll: true,
158
outsidePress: (event) =>
159
- (allowedOutsideClasses &&
160
- event.target instanceof Element &&
161
- !event.target.closest(allowedOutsideClasses)) ||
162
- false,
+ !allowedOutsideClasses
+ ? true
+ : event.target instanceof Element &&
+ !event.target.closest(allowedOutsideClasses),
163
});
164
165
const click = useClick(context, { enabled: !disabled });
0 commit comments