Prevent data being pasted twice in Chromium on Android
authorAlexander Ebert <ebert@woltlab.com>
Mon, 21 Sep 2020 10:05:45 +0000 (12:05 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 21 Sep 2020 10:05:45 +0000 (12:05 +0200)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabPaste.js

index 8f9434bab5de72c329e5097e1fcc8ab7a63802c8..beebe1dec7dfe1291df3d8681bd37d0747483440 100644 (file)
@@ -18,6 +18,9 @@ $.Redactor.prototype.WoltLabPaste = function() {
                        var mpInitChromeOnAndroid = (function (e) {
                                this.rtePaste = true;
                                var pre = !!(this.opts.type === 'pre' || this.utils.isCurrentOrParent('pre'));
+                               if (pre) {
+                                       e.preventDefault();
+                               }
                                
                                this.utils.saveScroll();
                                this.selection.save();