mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-31 07:32:59 +00:00 
			
		
		
		
	Check for DOM node existence before removing class. (#4696)
Can cause issues if dragstart and dragend actions trigger a refresh.
This commit is contained in:
		| @@ -75,8 +75,10 @@ DroppableWidget.prototype.leaveDrag = function(event) { | |||||||
| 	// Remove highlighting if we're leaving externally. The hacky second condition is to resolve a problem with Firefox whereby there is an erroneous dragenter event if the node being dragged is within the dropzone | 	// Remove highlighting if we're leaving externally. The hacky second condition is to resolve a problem with Firefox whereby there is an erroneous dragenter event if the node being dragged is within the dropzone | ||||||
| 	if(this.currentlyEntered.length === 0 || (this.currentlyEntered.length === 1 && this.currentlyEntered[0] === $tw.dragInProgress)) { | 	if(this.currentlyEntered.length === 0 || (this.currentlyEntered.length === 1 && this.currentlyEntered[0] === $tw.dragInProgress)) { | ||||||
| 		this.currentlyEntered = []; | 		this.currentlyEntered = []; | ||||||
|  | 		if(this.domNodes[0]) { | ||||||
| 			$tw.utils.removeClass(this.domNodes[0],"tc-dragover"); | 			$tw.utils.removeClass(this.domNodes[0],"tc-dragover"); | ||||||
| 		} | 		} | ||||||
|  | 	} | ||||||
| }; | }; | ||||||
|  |  | ||||||
| DroppableWidget.prototype.handleDragEnterEvent  = function(event) { | DroppableWidget.prototype.handleDragEnterEvent  = function(event) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 saqimtiaz
					saqimtiaz