do NOT show drag-n-drop actions, if we only have the cancel-drop action, added by default

This commit is contained in:
Ralf Becker 2020-06-03 16:57:51 +02:00
parent f0a6e34106
commit e613a561f6

View File

@ -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;
}