From 127f73b4fef285ef15f2464ac3c16b664ae660df Mon Sep 17 00:00:00 2001 From: Danny Coates Date: Wed, 16 Aug 2017 11:03:17 -0700 Subject: [PATCH] fixes #519 drag & drop --- frontend/src/upload.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/upload.js b/frontend/src/upload.js index 6ab00981..dea0b5dc 100644 --- a/frontend/src/upload.js +++ b/frontend/src/upload.js @@ -34,13 +34,13 @@ async function upload(event) { let file = ''; if (clickOrDrop === 'drop') { - if (!event.originalEvent.dataTransfer.files[0]) { + if (!event.dataTransfer.files[0]) { uploadWindow.classList.remove('ondrag'); return; } if ( - event.originalEvent.dataTransfer.files.length > 1 || - event.originalEvent.dataTransfer.files[0].size === 0 + event.dataTransfer.files.length > 1 || + event.dataTransfer.files[0].size === 0 ) { uploadWindow.classList.remove('ondrag'); document.l10n.formatValue('uploadPageMultipleFilesAlert').then(str => { @@ -48,7 +48,7 @@ async function upload(event) { }); return; } - file = event.originalEvent.dataTransfer.files[0]; + file = event.dataTransfer.files[0]; } else { file = event.target.files[0]; }