Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix: dont close sheet on toast dismiss

Scott Wilsonaa43c60cf7f0
diff --git a/frontend/src/components/v3/generic/Sheet/Sheet.tsx b/frontend/src/components/v3/generic/Sheet/Sheet.tsx
index 55c621b17f..72b730788c 100644
--- a/frontend/src/components/v3/generic/Sheet/Sheet.tsx
+++ b/frontend/src/components/v3/generic/Sheet/Sheet.tsx
@@ -44,6 +44,7 @@ function SheetContent({
className,
children,
side = "right",
+ onPointerDownOutside,
...props
}: React.ComponentProps<typeof SheetPrimitive.Content> & {
side?: "top" | "right" | "bottom" | "left";
@@ -53,6 +54,12 @@ function SheetContent({
<SheetOverlay />
<SheetPrimitive.Content
data-slot="sheet-content"
+ onPointerDownOutside={(e) => {
+ if ((e.target as HTMLElement)?.closest?.(".Toastify")) {
+ e.preventDefault();
+ }
+ onPointerDownOutside?.(e);
+ }}
className={cn(
"fixed z-50 flex thin-scrollbar flex-col gap-4 border-border bg-popover text-foreground shadow-lg outline-0 transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500",
side === "right" &&