diff --git a/core/modules/editor/factory.js b/core/modules/editor/factory.js index d7e5e3969..5cc9a2662 100644 --- a/core/modules/editor/factory.js +++ b/core/modules/editor/factory.js @@ -324,7 +324,7 @@ function editTextWidgetFactory(toolbarEngine,nonToolbarEngine) { If there are no Files, let the browser handle it. */ EditTextWidget.prototype.handleDropEvent = function(event) { - if(event.dataTransfer.files.length) { + if($tw.utils.dragEventContainsFiles(event)) { event.preventDefault(); event.stopPropagation(); this.dispatchDOMEvent(this.cloneEvent(event,["dataTransfer"])); diff --git a/core/modules/utils/dom/dragndrop.js b/core/modules/utils/dom/dragndrop.js index b6b381f37..21ecb334a 100644 --- a/core/modules/utils/dom/dragndrop.js +++ b/core/modules/utils/dom/dragndrop.js @@ -208,10 +208,10 @@ function parseJSONTiddlers(json,fallbackTitle) { return data; }; -exports.dragEventContainsFiles = function(event) { +function dragEventContainsType(event,targetType) { if(event.dataTransfer.types) { for(var i=0; i