Skip to content

Commit

Permalink
Merge branch 'MDL-44042-master' of git://github.com/andrewnicols/moodle
Browse files Browse the repository at this point in the history
Conflicts:
	lib/yui/build/moodle-core-dragdrop/moodle-core-dragdrop-min.js
  • Loading branch information
Sam Hemelryk committed Feb 16, 2014
2 parents 9e7fb3e + 2ab0238 commit fa52e64
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
Expand Up @@ -538,6 +538,15 @@ Y.extend(DRAGDROP, Y.Base, {
// Simulate the full sequence.
this.drag_start(dragevent);
this.global_drop_over(dropevent);

if (droptarget.hasClass(this.parentnodeclass) && droptarget.contains(dragcontainer)) {
// The global_drop_over function does not handle the case where an item was moved up, without the
// 'goingup' variable being set, as is the case wih keyboard drag/drop. We must detect this case and
// apply it after the drop_over, but before the drop_hit event in order for it to be moved to the
// correct location.
droptarget.prepend(dragcontainer);
}

this.global_drop_hit(dropevent);
},

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions lib/yui/build/moodle-core-dragdrop/moodle-core-dragdrop.js
Expand Up @@ -538,6 +538,15 @@ Y.extend(DRAGDROP, Y.Base, {
// Simulate the full sequence.
this.drag_start(dragevent);
this.global_drop_over(dropevent);

if (droptarget.hasClass(this.parentnodeclass) && droptarget.contains(dragcontainer)) {
// The global_drop_over function does not handle the case where an item was moved up, without the
// 'goingup' variable being set, as is the case wih keyboard drag/drop. We must detect this case and
// apply it after the drop_over, but before the drop_hit event in order for it to be moved to the
// correct location.
droptarget.prepend(dragcontainer);
}

this.global_drop_hit(dropevent);
},

Expand Down
9 changes: 9 additions & 0 deletions lib/yui/src/dragdrop/js/dragdrop.js
Expand Up @@ -536,6 +536,15 @@ Y.extend(DRAGDROP, Y.Base, {
// Simulate the full sequence.
this.drag_start(dragevent);
this.global_drop_over(dropevent);

if (droptarget.hasClass(this.parentnodeclass) && droptarget.contains(dragcontainer)) {
// The global_drop_over function does not handle the case where an item was moved up, without the
// 'goingup' variable being set, as is the case wih keyboard drag/drop. We must detect this case and
// apply it after the drop_over, but before the drop_hit event in order for it to be moved to the
// correct location.
droptarget.prepend(dragcontainer);
}

this.global_drop_hit(dropevent);
},

Expand Down

0 comments on commit fa52e64

Please sign in to comment.