Avoid a potential conflict with jquery.drag and use addEventListener to bind events.

This commit is contained in:
Aditya Toshniwal 2021-09-01 15:02:20 +05:30 committed by Akshay Joshi
parent 87c86beb38
commit 173517985e

View File

@ -100,9 +100,12 @@ define(
}
// Prevent browser from opening the drag file.
$container.bind('dragover drop', function (event) {
event.stopPropagation();
event.preventDefault();
// Using addEventListener to avoid conflict with jquery.drag
['dragover', 'drop'].forEach((eventName)=>{
$container[0].addEventListener(eventName, function(event) {
event.stopPropagation();
event.preventDefault();
});
});
if (that.elContainer) {