mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-26 14:18:21 +00:00
Partial fix for the sticky dropzone on firefox (#3809)
in my tests listening for the dragend event and removing the tc-dragover class in that case removes the `tc-dragover` every time it should ... without this, firefox often doesn't remove it and the green bar sticks at the top investigating now if the droppable widget has a similar problem
This commit is contained in:
parent
77e6f5c0e3
commit
16bb474fef
@ -42,7 +42,8 @@ DropZoneWidget.prototype.render = function(parent,nextSibling) {
|
|||||||
{name: "dragover", handlerObject: this, handlerMethod: "handleDragOverEvent"},
|
{name: "dragover", handlerObject: this, handlerMethod: "handleDragOverEvent"},
|
||||||
{name: "dragleave", handlerObject: this, handlerMethod: "handleDragLeaveEvent"},
|
{name: "dragleave", handlerObject: this, handlerMethod: "handleDragLeaveEvent"},
|
||||||
{name: "drop", handlerObject: this, handlerMethod: "handleDropEvent"},
|
{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) {
|
domNode.addEventListener("click",function (event) {
|
||||||
},false);
|
},false);
|
||||||
@ -103,6 +104,10 @@ DropZoneWidget.prototype.handleDragLeaveEvent = function(event) {
|
|||||||
this.leaveDrag(event);
|
this.leaveDrag(event);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
DropZoneWidget.prototype.handleDragEndEvent = function(event) {
|
||||||
|
$tw.utils.removeClass(this.domNodes[0],"tc-dragover");
|
||||||
|
};
|
||||||
|
|
||||||
DropZoneWidget.prototype.handleDropEvent = function(event) {
|
DropZoneWidget.prototype.handleDropEvent = function(event) {
|
||||||
var self = this,
|
var self = this,
|
||||||
readFileCallback = function(tiddlerFieldsArray) {
|
readFileCallback = function(tiddlerFieldsArray) {
|
||||||
|
Loading…
Reference in New Issue
Block a user