1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-08-06 22:04:19 +00:00

Avoid MSIE crash

Fixes #6014
This commit is contained in:
jeremy@jermolene.com 2021-09-01 09:56:17 +01:00
parent c9c5d4cf79
commit 62b8a83741

View File

@ -332,7 +332,7 @@ function editTextWidgetFactory(toolbarEngine,nonToolbarEngine) {
}; };
EditTextWidget.prototype.handlePasteEvent = function(event) { EditTextWidget.prototype.handlePasteEvent = function(event) {
if(event.clipboardData.files.length) { if(event.clipboardData && event.clipboardData.files && event.clipboardData.files.length) {
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();
this.dispatchDOMEvent(this.cloneEvent(event,["clipboardData"])); this.dispatchDOMEvent(this.cloneEvent(event,["clipboardData"]));