mirror of https://github.com/tauri-apps/tauri
fix(core): fix wrong file drop events (#2300)
This commit is contained in:
parent
426a6b4996
commit
c2b0fe1ce5
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
"tauri": patch
|
||||
"api": patch
|
||||
---
|
||||
|
||||
Fixes file drop events being swapped (`file-drop-hover` on drop and `file-drop` on hover).
|
|
@ -396,8 +396,8 @@ impl<R: Runtime> WindowManager<R> {
|
|||
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!(),
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue