diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2024-08-13 20:14:43 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2024-08-13 20:14:43 +0200 |
commit | c517b3865bf2083e9a779ec993497d578f016ef0 (patch) | |
tree | 842f70ae6be1b84ba54bc0a5fc3647321ce85fc7 | |
parent | e8f163976f4697cf68114fdc84092d8cad8c5bf4 (diff) |
-rw-r--r-- | src/ws/view.js | 8 |
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) |