diff --git a/app/helpers/notifications_helper.rb b/app/helpers/notifications_helper.rb index bb0dade2a..9d3b9a259 100644 --- a/app/helpers/notifications_helper.rb +++ b/app/helpers/notifications_helper.rb @@ -22,7 +22,7 @@ module NotificationsHelper def notification_tag(notification, &) link_to notification.resource, id: dom_id(notification), class: "notification border-radius", - data: { turbo_frame: "_top" }, & + data: { action: "click->dialog#close", turbo_frame: "_top" }, & end def notifications_next_page_link(page) diff --git a/app/views/notifications/_tray.html.erb b/app/views/notifications/_tray.html.erb index 476f0bc78..55fbfa570 100644 --- a/app/views/notifications/_tray.html.erb +++ b/app/views/notifications/_tray.html.erb @@ -4,11 +4,11 @@ data: { controller: "dialog", turbo_permanent: true, dialog_modal_value: false, dialog_target: "dialog", action: "keydown.esc->dialog#close:stop click@document->dialog#closeOnClickOutside" } do %> <%= turbo_frame_tag("notifications", src: notifications_tray_path) -%>