@uppy/drag-drop
Advanced tools
Comparing version 4.0.0 to 4.0.1
# @uppy/drag-drop | ||
## 4.0.1 | ||
Released: 2024-07-15 | ||
Included in: Uppy v4.0.1 | ||
- @uppy/dashboard,@uppy/drag-drop,@uppy/drop-target: `<Dashboard/>`, `<DragDrop/>`, `drop-target` - new anti-flickering solution (Evgenia Karunus / #5326) | ||
## 4.0.0-beta.1 | ||
@@ -4,0 +11,0 @@ |
@@ -28,3 +28,2 @@ import { UIPlugin, type Uppy } from '@uppy/core'; | ||
private isDragDropSupported; | ||
private removeDragOverClassTimeout; | ||
private fileInputRef; | ||
@@ -31,0 +30,0 @@ constructor(uppy: Uppy<M, B>, opts?: DragDropOptions); |
@@ -10,3 +10,3 @@ import { UIPlugin } from '@uppy/core'; | ||
const packageJson = { | ||
"version": "4.0.0" | ||
"version": "4.0.1" | ||
}; | ||
@@ -83,3 +83,2 @@ import locale from "./locale.js"; | ||
event.dataTransfer.dropEffect = 'none'; | ||
clearTimeout(this.removeDragOverClassTimeout); | ||
return; | ||
@@ -94,3 +93,2 @@ } | ||
event.dataTransfer.dropEffect = 'copy'; | ||
clearTimeout(this.removeDragOverClassTimeout); | ||
this.setPluginState({ | ||
@@ -105,10 +103,5 @@ isDraggingOver: true | ||
event.stopPropagation(); | ||
clearTimeout(this.removeDragOverClassTimeout); | ||
// Timeout against flickering, this solution is taken from drag-drop library. | ||
// Solution with 'pointer-events: none' didn't work across browsers. | ||
this.removeDragOverClassTimeout = setTimeout(() => { | ||
this.setPluginState({ | ||
isDraggingOver: false | ||
}); | ||
}, 50); | ||
this.setPluginState({ | ||
isDraggingOver: false | ||
}); | ||
(_this$opts$onDragLeav = (_this$opts2 = this.opts).onDragLeave) == null || _this$opts$onDragLeav.call(_this$opts2, event); | ||
@@ -120,5 +113,2 @@ }; | ||
event.stopPropagation(); | ||
clearTimeout(this.removeDragOverClassTimeout); | ||
// Remove dragover class | ||
this.setPluginState({ | ||
@@ -125,0 +115,0 @@ isDraggingOver: false |
{ | ||
"name": "@uppy/drag-drop", | ||
"description": "Droppable zone UI for Uppy. Drag and drop files into it to upload.", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"license": "MIT", | ||
@@ -32,4 +32,4 @@ "main": "lib/index.js", | ||
"peerDependencies": { | ||
"@uppy/core": "^4.0.0" | ||
"@uppy/core": "^4.0.1" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42198
546