From 33a88ea089e4a274aae9fef40c16a750323c9f8b Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 9 Oct 2013 09:12:02 +0000 Subject: [PATCH] Also accept meta (Command) key to turn on dragging files out of window --- phpgwapi/js/egw_action/egw_action_dragdrop.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpgwapi/js/egw_action/egw_action_dragdrop.js b/phpgwapi/js/egw_action/egw_action_dragdrop.js index a150db1064..4958dd8ca6 100644 --- a/phpgwapi/js/egw_action/egw_action_dragdrop.js +++ b/phpgwapi/js/egw_action/egw_action_dragdrop.js @@ -125,12 +125,12 @@ function egwDragActionImplementation() $j(node).off("mousedown") .on("mousedown", function(event) { - $j(node).draggable("option","disabled",event.ctrlKey); - $j(this).attr("draggable", event.ctrlKey ? "true" : "") + $j(node).draggable("option","disabled",event.ctrlKey || event.metaKey); + $j(this).attr("draggable", event.ctrlKey || event.metaKey ? "true" : "") // Disabling draggable adds some UI classes, but we don't care so remove them $j(node).removeClass("ui-draggable-disabled ui-state-disabled"); - if(!event.ctrlKey || !this.addEventListener) return; + if(!(event.ctrlKey || event.metaKey) || !this.addEventListener) return; }) .on("dragstart", function(event) { if(event.dataTransfer == null) {