Don't steal "paste" events from contenteditable elements

Fixes pasting with a WYSIWYG editor
This commit is contained in:
Jermolene
2018-08-20 15:26:41 +01:00
parent 0c965175aa
commit fbaceaa8bd
+1 -1
View File
@@ -145,7 +145,7 @@ DropZoneWidget.prototype.handlePasteEvent = function(event) {
self.dispatchEvent({type: "tm-import-tiddlers", param: JSON.stringify(tiddlerFieldsArray)}); self.dispatchEvent({type: "tm-import-tiddlers", param: JSON.stringify(tiddlerFieldsArray)});
}; };
// Let the browser handle it if we're in a textarea or input box // Let the browser handle it if we're in a textarea or input box
if(["TEXTAREA","INPUT"].indexOf(event.target.tagName) == -1) { if(["TEXTAREA","INPUT"].indexOf(event.target.tagName) == -1 && !event.target.isContentEditable) {
var self = this, var self = this,
items = event.clipboardData.items; items = event.clipboardData.items;
// Enumerate the clipboard items // Enumerate the clipboard items