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:
@@ -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
@@ -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;
|
||||
|
||||
Vendored
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user