Skip to content

Commit 9f218bb

Browse files
authored
Merge pull request #51 from beNative/codex/fix-drag-and-drop-bug-in-treeview
Fix lingering drag overlay after importing files
2 parents 3a11b23 + c017efb commit 9f218bb

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

App.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,11 @@ const MainApp: React.FC = () => {
309309

310310
const handleDropFiles = useCallback(async (files: FileList, parentId: string | null) => {
311311
if (!files || files.length === 0) return;
312-
312+
313+
// Ensure the global drag overlay is cleared when files are dropped anywhere in the app.
314+
dragCounter.current = 0;
315+
setIsDraggingFile(false);
316+
313317
const fileEntries = Array.from(files).map(file => {
314318
const f = file as FileWithRelativePath;
315319
return {

0 commit comments

Comments
 (0)