summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2016-01-20 17:20:14 -0500
committerhmhealey <harrisonmhealey@gmail.com>2016-01-20 17:21:12 -0500
commitcbfaff44cb6601ceda502486ed0b1e20a0ecb29f (patch)
tree8e32502f8ea8622d398c3126e876c41a90c91121 /web
parent9f526555df64885be27e38e588c23332d80cd208 (diff)
downloadchat-cbfaff44cb6601ceda502486ed0b1e20a0ecb29f.tar.gz
chat-cbfaff44cb6601ceda502486ed0b1e20a0ecb29f.tar.bz2
chat-cbfaff44cb6601ceda502486ed0b1e20a0ecb29f.zip
Completely disabled broken pasting of images on IE11
Diffstat (limited to 'web')
-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)) {