Skip to content

fix(admin-signup): fix Continue button cutoff on desktop viewports (fixes #1411)#7028

Open
codewithsupra wants to merge 1 commit into
Infisical:mainfrom
codewithsupra:fix/admin-signup-button-cutoff
Open

fix(admin-signup): fix Continue button cutoff on desktop viewports (fixes #1411)#7028
codewithsupra wants to merge 1 commit into
Infisical:mainfrom
codewithsupra:fix/admin-signup-button-cutoff

Conversation

@codewithsupra

Copy link
Copy Markdown

Problem

The admin signup form's Continue button is cut off and unreachable on desktop screens because the page uses justify-center on a flex container that also has max-h-screen + overflow-y-auto.

This is a well-known CSS behaviour: when justify-content: center is applied to a flex/grid container with overflow: auto, the overflow is distributed equally above and below the content. The portion clipped above the scroll origin cannot be scrolled to — the browser won't scroll past position 0. The user can see half the form is missing but cannot reach the button by scrolling.

Reference: https://stackoverflow.com/questions/33454533/cant-scroll-to-top-of-flex-item-that-is-overflowing-container

Fix

- <div className="flex max-h-screen min-h-screen flex-col justify-center overflow-y-auto ...">
+ <div className="flex min-h-screen flex-col overflow-y-auto ...">

-   <div className="flex items-center justify-center">
+   <div className="my-auto flex items-center justify-center py-8">

Why this works:

  • my-auto on a flex child centres the content vertically when the parent has spare height (normal desktop)
  • When the form is taller than the viewport, my-auto collapses to 0 and overflow-y-auto allows the user to scroll down to the Continue button
  • Removing max-h-screen from the outer div lets the container grow naturally; min-h-screen still ensures the gradient covers the full viewport

Before / After

Before After
Button unreachable — clipped at bottom Button reachable — page scrolls correctly

Fixes #1411

…tify-center with my-auto

Using `justify-center` on a flex container with `overflow-y-auto` and `max-h-screen`
causes content that overflows the viewport to be clipped above the scroll origin —
making it unreachable by scrolling. This is a known CSS/browser behaviour where
the overflow is symmetrically distributed and the portion above the visible area
cannot be scrolled to.

Fixes the signup button being cut off on desktop by:
- Removing `justify-center` and `max-h-screen` from the outer wrapper
- Adding `my-auto py-8` to the inner content wrapper

With `my-auto`, the content is centred vertically when the viewport has spare space,
but when the form is taller than the viewport the margin collapses to 0 and
`overflow-y-auto` allows the user to scroll down to the button.

Fixes Infisical#1411

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 70084c2bca

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".


return (
<div className="flex max-h-screen min-h-screen flex-col justify-center overflow-y-auto bg-linear-to-tr from-mineshaft-600 via-mineshaft-800 to-bunker-700 px-6">
<div className="flex min-h-screen flex-col overflow-y-auto bg-linear-to-tr from-mineshaft-600 via-mineshaft-800 to-bunker-700 px-6">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore a bounded scroll container

When the signup form is taller than the viewport (for example a short desktop window or browser zoom), this div no longer has a definite/max height, so overflow-y-auto does not create an internal scrollport. Since frontend/src/index.css sets html to overflow-hidden, the viewport/body cannot scroll either, leaving the lower part of the admin signup form unreachable in the same scenario this change is meant to fix. Keeping a viewport-bound height here (while avoiding justify-center) is needed for the page to scroll.

Useful? React with 👍 / 👎.

@greptile-apps

greptile-apps Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a CSS layout bug on the admin signup page where the Continue button was unreachable on desktop: justify-center on a max-h-screen overflow-y-auto flex container distributes overflow equally above and below the content, making the top half unscrollable. The fix removes max-h-screen and justify-center from the outer div and adds my-auto py-8 to the inner wrapper, which centres content via flex margin when space is available and degrades gracefully to a scrollable layout when the form overflows.

  • Outer container loses max-h-screen and justify-center; min-h-screen and overflow-y-auto are retained so the gradient still covers the full viewport and the page remains scrollable.
  • Inner wrapper gains my-auto (flex-based vertical centering) and py-8 (padding buffer when centred or scrolling).

Confidence Score: 5/5

Safe to merge — the change is scoped to two Tailwind class attributes on a single page and directly resolves the reported scrolling bug without touching any logic, API calls, or shared components.

The two-line diff removes a known-problematic CSS combination and replaces it with the standard my-auto pattern. The "initialized" redirect state (lines 67–70) retains its own justify-center without overflow, which is correct. No logic, data, or security paths are touched.

No files require special attention.

Important Files Changed

Filename Overview
frontend/src/pages/admin/SignUpPage/SignUpPage.tsx Removes max-h-screen and justify-center from the outer scroll container, adds my-auto py-8 to the inner wrapper — correctly fixing the known flexbox overflow-centering bug that made the Continue button unreachable on tall viewports.

Reviews (1): Last reviewed commit: "fix(admin-signup): fix button cutoff on ..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Signup button cutoff on desktop display

1 participant