Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a78d65c

Browse files
authored
fix: prevent new workspace page from scrolling past the bottom of the screen (#19705)
Fixes the overflow on the page and also improves the scroll behavior of the form Closes #19690 https://github.com/user-attachments/assets/00397698-ef34-4146-9589-9218c08510fe
1 parent 0ec9df3 commit a78d65c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

site/src/pages/CreateWorkspacePage/CreateWorkspacePageViewExperimental.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ export const CreateWorkspacePageViewExperimental: FC<
340340
});
341341

342342
return (
343-
<>
343+
<div className="flex flex-col flex-1 min-h-0 pb-12">
344344
<div className="sticky top-5 ml-10">
345345
<button
346346
onClick={onCancel}
@@ -351,7 +351,7 @@ export const CreateWorkspacePageViewExperimental: FC<
351351
Go back
352352
</button>
353353
</div>
354-
<div className="flex flex-col gap-6 max-w-screen-md mx-auto">
354+
<div className="flex flex-col flex-1 min-h-0 gap-6 max-w-screen-md mx-auto">
355355
<header className="flex flex-col items-start gap-3 mt-10">
356356
<div className="flex items-center gap-2 justify-between w-full">
357357
<span className="flex items-center gap-2">
@@ -412,7 +412,7 @@ export const CreateWorkspacePageViewExperimental: FC<
412412
<form
413413
onSubmit={form.handleSubmit}
414414
aria-label="Create workspace form"
415-
className="flex flex-col gap-10 w-full border border-border-default border-solid rounded-lg p-6"
415+
className="relative flex flex-col flex-1 min-h-0 overflow-y-auto gap-10 w-full border border-border-default border-solid rounded-lg p-6"
416416
>
417417
{Boolean(error) && <ErrorAlert error={error} />}
418418

@@ -683,6 +683,6 @@ export const CreateWorkspacePageViewExperimental: FC<
683683
</div>
684684
</form>
685685
</div>
686-
</>
686+
</div>
687687
);
688688
};

0 commit comments

Comments
 (0)