Skip to content

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

UI: fix z-index when trying to open a sheet inside a v2 component modal

adilson2f42b46a51ea
diff --git a/frontend/src/components/v3/generic/Sheet/Sheet.tsx b/frontend/src/components/v3/generic/Sheet/Sheet.tsx
index 982c9cab71..390961325d 100644
--- a/frontend/src/components/v3/generic/Sheet/Sheet.tsx
+++ b/frontend/src/components/v3/generic/Sheet/Sheet.tsx
@@ -45,13 +45,15 @@ function SheetContent({
children,
side = "right",
onPointerDownOutside,
+ overlayClassName,
...props
}: React.ComponentProps<typeof SheetPrimitive.Content> & {
side?: "top" | "right" | "bottom" | "left";
+ overlayClassName?: string;
}) {
return (
<SheetPortal>
- <SheetOverlay />
+ <SheetOverlay className={overlayClassName} />
<SheetPrimitive.Content
data-slot="sheet-content"
onPointerDownOutside={(e) => {
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AddAppConnectionModal.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AddAppConnectionModal.tsx
index b7fbee63cf..db0a888b42 100644
--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AddAppConnectionModal.tsx
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AddAppConnectionModal.tsx
@@ -81,7 +81,12 @@ export const AddAppConnectionModal = ({
return (
<>
<Sheet open={isOpen} onOpenChange={handleSheetOpenChange}>
- <SheetContent className="flex h-full max-h-full flex-col gap-y-0 sm:max-w-2xl">
+ <SheetContent
+ // z-[70] keeps this sheet above legacy v2 modals (z-[60]) that open it,
+ // e.g. the secret rotation Create/Edit modal.
+ className="z-[70] flex h-full max-h-full flex-col gap-y-0 sm:max-w-2xl"
+ overlayClassName="z-[70]"
+ >
<SheetHeader className="border-b">
{selectedApp ? (
<>