Welcome to the JavaScript feedback portal. We’re happy you’re here! If you have feedback on how to improve the JavaScript, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

The method getDragEvent calculates args.position thus:

 position = (iconClass == "e-drop-in") ? "Inside" : ((event.offsetY < 7) ? "Before" : "After");

So if a nodeDragging callback is added which changes args.dropIndicator to e.g. 'e-no-drop' then args.position in nodeDragStop will failed to detect when the drop is Inside because it's relying on the indicator icon to determine it.

I found this out when following the restrict drag and drop example in the documentation, but adapting it to prevent certain types of "Inside" drops and finding that a position during nodeDragging was correctly "Inside" but then when I'd changed args.dropIndicator to flag a given "Inside" drop wasn't permitted I was then finding that during my dragStop event args.position was wrongly set to "Before" because of this issue.

This is the example I was following:

https://ej2.syncfusion.com/react/documentation/treeview/how-to/restrict-the-drag-and-drop-for-particular-tree-nodes

You can easily see the bug if you change this example to log to console args.position in nodeDragStop and drag a file to a different position in the directory so the e-sibling indicator is showing (i.e. so the icon on the draggable is now showing e-no-drop as the icon when you drop between two siblings).