]> source.dussan.org Git - redmine.git/commitdiff
Fix that text copied from some applications such as MS Office and LibreOffice is...
authorGo MAEDA <maeda@farend.jp>
Tue, 19 Nov 2019 02:33:50 +0000 (02:33 +0000)
committerGo MAEDA <maeda@farend.jp>
Tue, 19 Nov 2019 02:33:50 +0000 (02:33 +0000)
Patch by Takenori TAKAKI.

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

public/javascripts/attachments.js

index b856ff4154c62179b1623448cf53938c8a280e6e..4a33daf55baad2680e1bfacd44ec78e68bd58b08 100644 (file)
@@ -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++) {