From f45554bfc33a6892bf408d9b3e09523840e186f0 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Wed, 30 Apr 2025 11:27:09 +0200 Subject: [PATCH] Use dialog controller actions, re-enable default action --- app/views/layouts/_lightbox.html.erb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/layouts/_lightbox.html.erb b/app/views/layouts/_lightbox.html.erb index 91f3af7bc..ac30fc601 100644 --- a/app/views/layouts/_lightbox.html.erb +++ b/app/views/layouts/_lightbox.html.erb @@ -1,10 +1,11 @@ - +<%= tag.dialog class:"lightbox", aria: { label: "Image Viewer (Press escape to close)" }, + data: { controller: "dialog", dialog_target: "dialog", lightbox_target: "dialog", action: "close->lightbox#reset" } do %> - +<% end %>