From 2584a4ef554d0ed615aec2792a32c1f1734afe8a Mon Sep 17 00:00:00 2001 From: Aarnav Tale Date: Sat, 30 May 2026 18:48:27 -0400 Subject: [PATCH] fix(dialog): stop clipping focus rings in scrollable content MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #556 added overflow-y-auto to the dialog content container. Per the CSS spec, when one overflow axis is non-visible the other resets from visible to auto, so overflow-x was being silently clamped too — clipping the ~2px focus ring on inputs/buttons against the left edge of the container. Add px-1/-mx-1 so the layout width is unchanged while focus rings get room to render. Amp-Thread-ID: https://ampcode.com/threads/T-019e7ae4-6862-760c-a3e7-239350eab71d Co-authored-by: Amp --- CHANGELOG.md | 1 + app/components/dialog.tsx | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d170534..b14cf6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - **Made Headscale boot resilient.** Headplane now boots even when Headscale is unreachable; capabilities default permissively and a background retry settles them once Headscale responds. No more cold-start ordering problems with docker-compose. - Fixed user-management actions (link, change role, transfer ownership) using the wrong ID type for unlinked Headplane users. Form fields are now explicitly `headplane_user_id` vs `headscale_user_id`, and the auth layer no longer round-trips through Headscale to recover the OIDC subject. - Fixed dialog panels growing beyond the viewport; dialog content is now constrained and scrollable (via [#556](https://github.com/tale/headplane/pull/556)). +- Fixed focus rings on inputs and buttons inside dialogs being clipped by the scrollable content container. - Corrected the Docker healthcheck example in the docs to use the required `CMD` prefix so reverse proxies don't see the container as unhealthy (closes [#535](https://github.com/tale/headplane/issues/535)). --- diff --git a/app/components/dialog.tsx b/app/components/dialog.tsx index b1d97e2..52917d5 100644 --- a/app/components/dialog.tsx +++ b/app/components/dialog.tsx @@ -79,7 +79,12 @@ function Panel(props: DialogPanelProps) { } }} > -
{children}
+ {/* px-1 -mx-1 gives focus rings on inputs/buttons room to render + without being clipped by overflow-y-auto (which implicitly forces + overflow-x: auto per CSS spec). */} +
+ {children} +
{variant === "unactionable" ? ( Close} />