Skip to content

Commit 01b8a42

Browse files
committed
feat: add on_cancel functionality to video modal for improved user interaction
1 parent 48f4d72 commit 01b8a42

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/algora_web/live/home_live.ex

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,16 @@ defmodule AlgoraWeb.HomeLive do
824824
</main>
825825
</div>
826826
827-
<.dialog id="video-modal" show={false} class="w-screen h-screen lg:max-w-none p-[5rem]">
827+
<.dialog
828+
id="video-modal"
829+
show={false}
830+
class="w-screen h-screen lg:max-w-none p-[5rem]"
831+
on_cancel={
832+
%JS{}
833+
|> JS.set_attribute({"src", ""}, to: "#video-modal-iframe")
834+
|> JS.set_attribute({"title", ""}, to: "#video-modal-iframe")
835+
}
836+
>
828837
<.dialog_content class="flex items-center justify-center">
829838
<iframe
830839
id="video-modal-iframe"

0 commit comments

Comments
 (0)