From e613a561f63f0053027e350fe4f380f779360c73 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 3 Jun 2020 16:57:51 +0200 Subject: [PATCH] do NOT show drag-n-drop actions, if we only have the cancel-drop action, added by default --- api/js/egw_action/egw_action_popup.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/js/egw_action/egw_action_popup.js b/api/js/egw_action/egw_action_popup.js index 3a5e9940af..1c9fc01fff 100644 --- a/api/js/egw_action/egw_action_popup.js +++ b/api/js/egw_action/egw_action_popup.js @@ -649,8 +649,10 @@ function egwPopupActionImplementation() var drag = _selected[0].getSelectedLinks('drag').links; var drop = _selected[0].getSelectedLinks('drop').links; - // No drags & no drops means early exit - if((!drag || jQuery.isEmptyObject(drag)) && (!drop || jQuery.isEmptyObject(drop))) + // No drags & no drops means early exit (only by default added egw_cancel_drop does NOT count!) + if ((!drag || jQuery.isEmptyObject(drag)) && + (!drop || jQuery.isEmptyObject(drop) || + Object.keys(drop).length === 1 && typeof drop.egw_cancel_drop !== 'undefined')) { return; }