How can I stop or prevent default execution of drag and drop



Hi, I wrote a plugin for drag and drop event on some folders, it is successful but after my plugin execution, it is going for default execution. I don’t want default execution which gives me an error, that’s why i wrote my own customized plugin. any ideas…?

here is my code :

tree.on(“drop”, function(e) {

          if ( && e.selectedNodes) {
            // I will do my work here

// here I want a statement that will prevent default execution

Note : preventDefault() function is not working.


Could also try out e.stopPropagation();. See stopPropagation Mozilla Developer Network docs.


e.stopPropagation(); is not working in any browser. Any other way…?


while debugging in browser e.preventDefault() shows undefined. Is preventDefault() is not part of api of ace editor…?