diff --git a/core/modules/widgets/dropzone.js b/core/modules/widgets/dropzone.js index 7968f5a44..c4cb36262 100644 --- a/core/modules/widgets/dropzone.js +++ b/core/modules/widgets/dropzone.js @@ -42,7 +42,8 @@ DropZoneWidget.prototype.render = function(parent,nextSibling) { {name: "dragover", handlerObject: this, handlerMethod: "handleDragOverEvent"}, {name: "dragleave", handlerObject: this, handlerMethod: "handleDragLeaveEvent"}, {name: "drop", handlerObject: this, handlerMethod: "handleDropEvent"}, - {name: "paste", handlerObject: this, handlerMethod: "handlePasteEvent"} + {name: "paste", handlerObject: this, handlerMethod: "handlePasteEvent"}, + {name: "dragend", handlerObject: this, handlerMethod: "handleDragEndEvent"} ]); domNode.addEventListener("click",function (event) { },false); @@ -103,6 +104,10 @@ DropZoneWidget.prototype.handleDragLeaveEvent = function(event) { this.leaveDrag(event); }; +DropZoneWidget.prototype.handleDragEndEvent = function(event) { + $tw.utils.removeClass(this.domNodes[0],"tc-dragover"); +}; + DropZoneWidget.prototype.handleDropEvent = function(event) { var self = this, readFileCallback = function(tiddlerFieldsArray) {