summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ws/view.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ws/view.js b/src/ws/view.js
index 70d938a..541226f 100644
--- a/src/ws/view.js
+++ b/src/ws/view.js
@@ -86,11 +86,12 @@ function getElementAfter(e)
return element_after;
}
+var drag_id = -1;
function drag(e)
{
// e.target is always a node.element here
var id = e.target.id;
- e.dataTransfer.setData('id', id);
+ drag_id = id;
e.stopPropagation(); // <--- this fixes the drag target problem
update(idFromStr(id), "dragged", "true");
}
@@ -147,8 +148,7 @@ function dragEnd(e)
{
e.stopPropagation();
- // FIXME: This doesn't seem to work in Chromium 65
- var id = e.dataTransfer.getData('id');
+ var id = drag_id;
update(idFromStr(id), "dragged", "false");
// // Only highlight children areas
@@ -184,7 +184,7 @@ function drop(e)
return;
}
- var id = e.dataTransfer.getData('id');
+ var id = drag_id;
//update(idFromStr(id), "dragged", "false");
// Get drop id from targets parent (children tag inside the node)