From 9d58dc02835646018a608468c450de557503488a Mon Sep 17 00:00:00 2001 From: Dave Shoreman Date: Tue, 29 Oct 2024 11:48:13 +0000 Subject: [PATCH] Fix slide-over wrapper not being hidden When the slide over component is hidden without a route change, the wrapper and overlay don't get hidden and block scrolling beneath it. --- lib/petal_components/slide_over.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/petal_components/slide_over.ex b/lib/petal_components/slide_over.ex index 1d044e2..356758d 100644 --- a/lib/petal_components/slide_over.ex +++ b/lib/petal_components/slide_over.ex @@ -136,6 +136,7 @@ defmodule PetalComponents.SlideOver do }, to: "#slide-over-content" ) + |> JS.hide(to: "#slide-over") if close_slide_over_target do JS.push(js, "close_slide_over", target: close_slide_over_target)