diff --git a/.changes/fix-file-drop-events.md b/.changes/fix-file-drop-events.md new file mode 100644 index 000000000..0ece0fa1e --- /dev/null +++ b/.changes/fix-file-drop-events.md @@ -0,0 +1,6 @@ +--- +"tauri": patch +"api": patch +--- + +Fixes file drop events being swapped (`file-drop-hover` on drop and `file-drop` on hover). \ No newline at end of file diff --git a/core/tauri/src/manager.rs b/core/tauri/src/manager.rs index 5d6810100..0c953b3b9 100644 --- a/core/tauri/src/manager.rs +++ b/core/tauri/src/manager.rs @@ -396,8 +396,8 @@ impl WindowManager { crate::async_runtime::block_on(async move { let window = Window::new(manager.clone(), window, app_handle); let _ = match event { - FileDropEvent::Hovered(paths) => window.emit("tauri://file-drop", Some(paths)), - FileDropEvent::Dropped(paths) => window.emit("tauri://file-drop-hover", Some(paths)), + FileDropEvent::Hovered(paths) => window.emit("tauri://file-drop-hover", Some(paths)), + FileDropEvent::Dropped(paths) => window.emit("tauri://file-drop", Some(paths)), FileDropEvent::Cancelled => window.emit("tauri://file-drop-cancelled", Some(())), _ => unimplemented!(), };