summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-11-19 02:33:50 +0000
committerGo MAEDA <maeda@farend.jp>2019-11-19 02:33:50 +0000
commit18e6cc9cb6c655c5ef32b07fa7cf764d7821b94f (patch)
tree058020b4b56aa2e9656fa81151d2c8ba242ed2e5 /public
parent4a90acb49e18ea9cc878b1d0a1beaa8980544675 (diff)
downloadredmine-18e6cc9cb6c655c5ef32b07fa7cf764d7821b94f.tar.gz
redmine-18e6cc9cb6c655c5ef32b07fa7cf764d7821b94f.zip
Fix that text copied from some applications such as MS Office and LibreOffice is pasted as an image in addition to plain text (#32469, #3816).
Patch by Takenori TAKAKI. git-svn-id: http://svn.redmine.org/redmine/trunk@19089 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public')
-rw-r--r--public/javascripts/attachments.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js
index b856ff415..4a33daf55 100644
--- a/public/javascripts/attachments.js
+++ b/public/javascripts/attachments.js
@@ -255,6 +255,7 @@ function copyImageFromClipboard(e) {
if (!$(e.target).hasClass('wiki-edit')) { return; }
var clipboardData = e.clipboardData || e.originalEvent.clipboardData
if (!clipboardData) { return; }
+ if (clipboardData.types.some(t => /^text/.test(t))) { return; }
var items = clipboardData.items
for (var i = 0 ; i < items.length ; i++) {