From 457e5f63e12135753908a85d9950794de73adab9 Mon Sep 17 00:00:00 2001
From: bbaer <bbaer@math.uzh.ch>
Date: Mon, 4 Jun 2018 15:02:00 +0200
Subject: [PATCH] preventing from bleeding into other dnd-sorts on the same
 page

---
 javascript/src/DragAndDrop.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/javascript/src/DragAndDrop.js b/javascript/src/DragAndDrop.js
index 6be7b3b4d..19f2d447a 100644
--- a/javascript/src/DragAndDrop.js
+++ b/javascript/src/DragAndDrop.js
@@ -26,6 +26,7 @@ var QfqNS = QfqNS || {};
         this.eventEmitter = new EventEmitter();
         this.dropZones = [];
         this.elements = [];
+        this.active = false;
         this.api = $hook.data("dnd-api");
         this.draggedId = "";
         this.lastChild = "";
@@ -195,13 +196,16 @@ var QfqNS = QfqNS || {};
             child.on("dragstart", function(e) {
                 e.originalEvent.dataTransfer.setData("text", child[0].id);
                 that.draggedId = child[0].id;
+                that.active = true;
                 e.originalEvent.dataTransfer.effectAllowed = "move";
             });
             child.on("dragenter", function(e) {
-
-                that._buildOrderDropZones($(this), e);
+                if (that.active) {
+                    that._buildOrderDropZones($(this), e);
+                }
             });
             child.on("dragend", function() {
+                that.active = false;
                 that.removeDropAreas();
             });
         });
-- 
GitLab