MDL-65539 dragdrop: Ignore drag proxy in keyboard menu

Before this change the node that is displayed during a the last mouse
drag and drop would be listed in a keyboard drag and drop if it was
the container node of one of the types of node being moved in this action.

If a node is inside a node with the .yui3-dd-proxy class then it is
one of the proxy elements used to display the dragged content during
mouse drag and drop so we will start ignoring it.
This commit is contained in:
Neill Magill
2020-04-03 08:37:47 +01:00
parent a7ac45bc7d
commit 8d6234bedc
4 changed files with 5 additions and 5 deletions
@@ -437,7 +437,7 @@ Y.extend(DRAGDROP, Y.Base, {
var i, j;
for (i = 0; i < elementgroups.length; i++) {
for (j = 0; j < this.groups.length; j++) {
if (elementgroups[i] === this.groups[j] && !(node == dragcontainer ||
if (elementgroups[i] === this.groups[j] && !node.ancestor('.yui3-dd-proxy') && !(node == dragcontainer ||
node.next(className) === dragcontainer || node.get('children').item(0) == dragcontainer)) {
// This is a parent node of the grabbed node (used for dropping in empty sections).
validdrop = true;
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -437,7 +437,7 @@ Y.extend(DRAGDROP, Y.Base, {
var i, j;
for (i = 0; i < elementgroups.length; i++) {
for (j = 0; j < this.groups.length; j++) {
if (elementgroups[i] === this.groups[j] && !(node == dragcontainer ||
if (elementgroups[i] === this.groups[j] && !node.ancestor('.yui3-dd-proxy') && !(node == dragcontainer ||
node.next(className) === dragcontainer || node.get('children').item(0) == dragcontainer)) {
// This is a parent node of the grabbed node (used for dropping in empty sections).
validdrop = true;
+1 -1
View File
@@ -435,7 +435,7 @@ Y.extend(DRAGDROP, Y.Base, {
var i, j;
for (i = 0; i < elementgroups.length; i++) {
for (j = 0; j < this.groups.length; j++) {
if (elementgroups[i] === this.groups[j] && !(node == dragcontainer ||
if (elementgroups[i] === this.groups[j] && !node.ancestor('.yui3-dd-proxy') && !(node == dragcontainer ||
node.next(className) === dragcontainer || node.get('children').item(0) == dragcontainer)) {
// This is a parent node of the grabbed node (used for dropping in empty sections).
validdrop = true;