mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-10 07:43:49 +00:00
Fix bug that was preventing pasting into edit textareas or input boxes
This commit is contained in:
parent
588c7cb07f
commit
45ee2b3048
@ -91,6 +91,7 @@ ImportWidget.prototype.handleDropEvent = function(event) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ImportWidget.prototype.handlePasteEvent = function(event) {
|
ImportWidget.prototype.handlePasteEvent = function(event) {
|
||||||
|
if(["TEXTAREA","INPUT"].indexOf(event.srcElement.tagName) == -1) {
|
||||||
var self = this,
|
var self = this,
|
||||||
items = event.clipboardData.items;
|
items = event.clipboardData.items;
|
||||||
for(var t = 0; t<items.length; t++) {
|
for(var t = 0; t<items.length; t++) {
|
||||||
@ -112,6 +113,9 @@ ImportWidget.prototype.handlePasteEvent = function(event) {
|
|||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
return false;
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
ImportWidget.prototype.openTiddler = function(title) {
|
ImportWidget.prototype.openTiddler = function(title) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user