You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Clicking outside the Dialog modal on mobile web doesn't close dialog
To Reproduce
Go to the showcase and set your screen size to iPhone 14 Pro Max. Open the "edit profie" dialong and try to close it by clicking outside the modal
Expected behavior
Clicking outside the modal should close it - see shadcn on the same mobile sized screen
Platform (please complete the following information):
Type: desktop
OS: MacOS
Browser Chrome, Firefox
The text was updated successfully, but these errors were encountered:
this is correct and it's annoying i kept trying stuff but for now i will be using this approache
constDialogOverlayWeb=React.forwardRef<React.ElementRef<typeofDialogPrimitive.Overlay>,React.ComponentPropsWithoutRef<typeofDialogPrimitive.Overlay>>(({ className, ...props},ref)=>{const{ open, onOpenChange }=DialogPrimitive.useRootContext();// Function to handle press events on the overlayconsthandlePress=(event: GestureResponderEvent)=>{// Get the target element from the eventconsttarget=event.target;constcurrentTarget=event.currentTarget;// If target === currentTarget, the press was directly on the overlay// If they're different, the press was on a child elementif(target===currentTarget){// Close the dialogonOpenChange(false);}};return(<DialogPrimitive.Overlaystyle={StyleSheet.absoluteFill}className={cn("z-50 bg-black/80 flex justify-center items-center p-2",open
? "web:animate-in web:fade-in-0"
: "web:animate-out web:fade-out-0",className,)}{...props}ref={ref}onPress={handlePress}/>);});
hopefully they fix it same thing happens with select but the select has been solved but can't use the same solution for the dialog dialog
Describe the bug
Clicking outside the Dialog modal on mobile web doesn't close dialog
To Reproduce
Go to the showcase and set your screen size to iPhone 14 Pro Max. Open the "edit profie" dialong and try to close it by clicking outside the modal
Expected behavior
Clicking outside the modal should close it - see shadcn on the same mobile sized screen
Platform (please complete the following information):
The text was updated successfully, but these errors were encountered: