From 1cae39b1053cc62c18775d01a5a83ea84c9f840c Mon Sep 17 00:00:00 2001 From: patriceac <48073125+patriceac@users.noreply.github.com> Date: Sat, 17 Dec 2022 03:05:43 -0800 Subject: [PATCH] Fire an event when a collapsible is toggled Need an event to know that a collapsible got toggled to be able to resize the panels accordingly. Thanks! --- ui/media/js/utils.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/media/js/utils.js b/ui/media/js/utils.js index 09e1e502..50f5f162 100644 --- a/ui/media/js/utils.js +++ b/ui/media/js/utils.js @@ -45,6 +45,7 @@ function toggleCollapsible(element) { handle.innerHTML = '➖' // minus } } + document.dispatchEvent(new CustomEvent('collapsibleClick', { detail: collapsibleHeader })) if (COLLAPSIBLES_INITIALIZED && COLLAPSIBLE_PANELS.includes(element)) { saveCollapsibles()