From 58fd61ad3154101c664f8cbf9573e3a3e6a98931 Mon Sep 17 00:00:00 2001 From: hadi Date: Mon, 22 May 2023 11:45:17 +0200 Subject: [PATCH] Cleanup hover color after drag action ended --- api/js/egw_action/egw_action_dragdrop.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/js/egw_action/egw_action_dragdrop.js b/api/js/egw_action/egw_action_dragdrop.js index c8cef2e38d..462775661a 100644 --- a/api/js/egw_action/egw_action_dragdrop.js +++ b/api/js/egw_action/egw_action_dragdrop.js @@ -282,6 +282,8 @@ export function egwDragActionImplementation() if (helper) helper.remove(); const draggable = document.querySelector('.drag--moving'); if (draggable) draggable.classList.remove('drag--moving'); + // cleanup drop hover class from all other DOMs if there's still anything left + Array.from(document.getElementsByClassName('et2dropzone drop-hover')).forEach(_i=>{_i.classList.remove('drop-hover')}) }; // Drag Event listeners