scroll flash messages into view on mount

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
jamey 2026-03-13 13:34:32 +00:00
parent a2d6bf8a02
commit f2e9960303

View File

@ -48,6 +48,7 @@ defmodule BerrypodWeb.CoreComponents do
role={if(@kind == :error, do: "alert", else: "status")} role={if(@kind == :error, do: "alert", else: "status")}
aria-live={if(@kind == :error, do: "assertive", else: "polite")} aria-live={if(@kind == :error, do: "assertive", else: "polite")}
class="admin-banner" class="admin-banner"
phx-mounted={JS.dispatch("scroll-into-view", to: "##{@id}")}
{@rest} {@rest}
> >
<div class={[ <div class={[