From cfd117c756a53aa6c0220ac5f8b0b9431846eeb5 Mon Sep 17 00:00:00 2001 From: Nicolas CARPi Date: Fri, 12 Apr 2024 17:39:52 +0200 Subject: [PATCH] assume preventDefault() exists, only IE 6 doesn't support this --- src/dropzone.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/dropzone.js b/src/dropzone.js index 807dcfcf0..711550b2a 100644 --- a/src/dropzone.js +++ b/src/dropzone.js @@ -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