summaryrefslogtreecommitdiffstats
path: root/web/react
diff options
context:
space:
mode:
Diffstat (limited to 'web/react')
-rw-r--r--web/react/components/file_upload.jsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/web/react/components/file_upload.jsx b/web/react/components/file_upload.jsx
index fef253c52..7e6cc2942 100644
--- a/web/react/components/file_upload.jsx
+++ b/web/react/components/file_upload.jsx
@@ -151,7 +151,11 @@ export default class FileUpload extends React.Component {
});
}
- document.addEventListener('paste', function handlePaste(e) {
+ document.addEventListener('paste', (e) => {
+ if (!e.clipboardData) {
+ return;
+ }
+
var textarea = $(inputDiv.parentNode.parentNode).find('.custom-textarea')[0];
if (textarea !== e.target && !$.contains(textarea, e.target)) {