From f86b53778d04c483bfd206eac57758f38cc98cbe Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Mon, 2 May 2022 20:35:15 +0200 Subject: [PATCH] FIX: closes popover when downloading calendar (#16598) --- .../javascripts/initializers/discourse-local-dates.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/discourse-local-dates/assets/javascripts/initializers/discourse-local-dates.js b/plugins/discourse-local-dates/assets/javascripts/initializers/discourse-local-dates.js index d73c671140f..ea2a3b792ab 100644 --- a/plugins/discourse-local-dates/assets/javascripts/initializers/discourse-local-dates.js +++ b/plugins/discourse-local-dates/assets/javascripts/initializers/discourse-local-dates.js @@ -246,6 +246,13 @@ export default { endsAt: dataset.endsAt, }, ]); + + // TODO: remove this when rewriting preview as a component + const parentPopover = event.target.closest("[data-tippy-root]"); + if (parentPopover?._tippy) { + parentPopover._tippy.hide(); + } + return; }