summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-06-26 09:13:47 +0000
committerGo MAEDA <maeda@farend.jp>2020-06-26 09:13:47 +0000
commitc1be4e3ec4880d9e23daed11dc5813b6444bb495 (patch)
tree48b462e41eb7d41fdfd389dca9686324c1388c49
parent986d487fcd18e6ba49e867e905559b575f003bd2 (diff)
downloadredmine-c1be4e3ec4880d9e23daed11dc5813b6444bb495.tar.gz
redmine-c1be4e3ec4880d9e23daed11dc5813b6444bb495.zip
Cannot paste image from clipboard when copying the image from web browsers or some apps (#33639).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@19834 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--public/javascripts/attachments.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js
index 01cf5cc15..76203455e 100644
--- a/public/javascripts/attachments.js
+++ b/public/javascripts/attachments.js
@@ -258,7 +258,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(function(t){ return /^text/.test(t); })) { return; }
+ if (clipboardData.types.some(function(t){ return /^text\/plain$/.test(t); })) { return; }
var items = clipboardData.items
for (var i = 0 ; i < items.length ; i++) {