Fixed code pasting in IE
authorAlexander Ebert <ebert@woltlab.com>
Tue, 13 Sep 2016 10:19:59 +0000 (12:19 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 13 Sep 2016 10:20:06 +0000 (12:20 +0200)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabPaste.js

index e115de25d1fb4f713a21969a4de230a6d438eb1d..a3b4a281f7566f1ab3d70be654c280848f474c35 100644 (file)
@@ -35,7 +35,9 @@ $.Redactor.prototype.WoltLabPaste = function() {
                        this.paste.getPasteBoxCode = (function (pre) {
                                var returnValue = mpGetPasteBoxCode.call(this, pre);
                                
-                               if (pre && !returnValue) {
+                               // use clipboard data if paste box is flawed or when
+                               // pasting in IE 11 where clipboard data is more reliable
+                               if (pre && (!returnValue || isIe)) {
                                        return clipboardData;
                                }
                                
@@ -54,7 +56,6 @@ $.Redactor.prototype.WoltLabPaste = function() {
                                        return (window.clipboardData.files.length > 0);
                                }
                                
-                               
                                if (this.detect.isFirefox())
                                {
                                        return false;