Skip to content

Commit

Permalink
assume preventDefault() exists, only IE 6 doesn't support this
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasCARPi committed Apr 12, 2024
1 parent 0a678f6 commit cfd117c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/dropzone.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,7 @@ export default class Dropzone extends Emitter {
// drag and drop behaviour.
if (!containsFiles(e)) return;
e.stopPropagation();
if (e.preventDefault) {
return e.preventDefault();
} else {
return (e.returnValue = false);
}
return e.preventDefault();
};

// Create the listeners
Expand Down

0 comments on commit cfd117c

Please sign in to comment.