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

javascript
customization
plugin

#1

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.target && e.selectedNodes) {
            // I will do my work here
          }

// here I want a statement that will prevent default execution
});

Note : preventDefault() function is not working.


#2

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


#3

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


#4

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