Scroll runtime connection error into view

This commit is contained in:
Jonatan Kłosko 2024-09-19 17:02:27 +07:00
parent 5f2da6f914
commit 7f5917b447

View file

@ -85,7 +85,9 @@ defmodule LivebookWeb.SessionLive.RuntimeComponent do
</div>
<div
:if={@error_message && @type == runtime_type(@runtime) && @runtime_status == :disconnected}
class="error-box"
id="runtime-connection-error"
class="error-box scroll-mt-4"
phx-mounted={JS.dispatch("lb:scroll_into_view", detail: %{behavior: "instant"})}
>
<%= @error_message %>
</div>