Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-35767 Fix missing target event group check

Prevent interfering between items from different groups (and no groups)
  • Loading branch information...
commit 2596265b364cbac2635f7a457879ba94b95bb568 1 parent 5d6285c
@kabalin kabalin authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/yui/dragdrop/dragdrop.js
View
4 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;
Please sign in to comment.
Something went wrong with that request. Please try again.