Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Fix popover scrolling inside of dialogs

Tim Wilsonad02a7e01a3c
diff --git a/packages/ui/src/modal.tsx b/packages/ui/src/modal.tsx
index ba90bb8036..8ec914daed 100644
--- a/packages/ui/src/modal.tsx
+++ b/packages/ui/src/modal.tsx
@@ -86,17 +86,18 @@ export function Modal({
// for detecting when there's an active opened modal
id="modal-backdrop"
className="animate-fade-in fixed inset-0 z-40 bg-gray-100 bg-opacity-50 backdrop-blur-md"
- />
- <Dialog.Content
- onOpenAutoFocus={(e) => e.preventDefault()}
- onCloseAutoFocus={(e) => e.preventDefault()}
- className={cn(
- "animate-scale-in fixed inset-0 z-40 m-auto max-h-fit w-full max-w-md overflow-hidden border border-gray-200 bg-white p-0 shadow-xl sm:rounded-2xl",
- className,
- )}
>
- {children}
- </Dialog.Content>
+ <Dialog.Content
+ onOpenAutoFocus={(e) => e.preventDefault()}
+ onCloseAutoFocus={(e) => e.preventDefault()}
+ className={cn(
+ "animate-scale-in fixed inset-0 z-40 m-auto max-h-fit w-full max-w-md overflow-hidden border border-gray-200 bg-white p-0 shadow-xl sm:rounded-2xl",
+ className,
+ )}
+ >
+ {children}
+ </Dialog.Content>
+ </Dialog.Overlay>
</Dialog.Portal>
</Dialog.Root>
);