1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 18:17:20 +00:00

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

View File

@ -145,7 +145,7 @@ DropZoneWidget.prototype.handlePasteEvent = function(event) {
self.dispatchEvent({type: "tm-import-tiddlers", param: JSON.stringify(tiddlerFieldsArray)});
};
// 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,
items = event.clipboardData.items;
// Enumerate the clipboard items