]> source.dussan.org Git - redmine.git/commitdiff
Cannot paste image from clipboard when copying the image from web browsers or some...
authorGo MAEDA <maeda@farend.jp>
Fri, 26 Jun 2020 09:13:47 +0000 (09:13 +0000)
committerGo MAEDA <maeda@farend.jp>
Fri, 26 Jun 2020 09:13:47 +0000 (09:13 +0000)
Patch by Go MAEDA.

git-svn-id: http://svn.redmine.org/redmine/trunk@19834 e93f8b46-1217-0410-a6f0-8f06a7374b81

public/javascripts/attachments.js

index 01cf5cc15756d0b4288678f8fddd9b3481dd4439..76203455e8514374c833ab5517448f97dc2858c2 100644 (file)
@@ -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++) {