From 2596265b364cbac2635f7a457879ba94b95bb568 Mon Sep 17 00:00:00 2001 From: Ruslan Kabalin Date: Wed, 3 Oct 2012 13:42:10 +0100 Subject: [PATCH] MDL-35767 Fix missing target event group check Prevent interfering between items from different groups (and no groups) --- lib/yui/dragdrop/dragdrop.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/yui/dragdrop/dragdrop.js b/lib/yui/dragdrop/dragdrop.js index 20c3a818b4a..c46205b7c1b 100644 --- a/lib/yui/dragdrop/dragdrop.js +++ b/lib/yui/dragdrop/dragdrop.js @@ -167,6 +167,10 @@ YUI.add('moodle-core-dragdrop', function(Y) { // this.lastdroptarget (ghost node we use for indicating where to drop) e.drag = e.target; e.drop = this.lastdroptarget; + // Check that drag object belongs to correct group + if (!this.in_group(e.drag)) { + return; + } // Check that drop object belong to correct group if (!e.drop || !e.drop.inGroup(this.groups)) { return;