Describe the bug
As far as we know, by default, Tauri handles drag-n-drop via its own tauri://drop and related events.
While in Linux (both Ubuntu 22.04 and 24.04), once a file is dropped onto the window, an tauri://drag-cancelled is emitted instead, and the webview is unexpectedly navigated to the dropped file.
Reproduction
Link: https://github.com/xingrz/tauri-v2-drag-n-drop
- Run the demo
- Open the Web Inspector, and switch to
Console tab. Enable Preserve Log

- Drag and drop some file(s) onto the window
As its shown in the screenshot below, tauri://drag-cancelled is emitted, and the webview is navigated to the file (package.json) just dropped.
Expected behavior
A tauri://drop should be emitted. In the above minimal reproduction, size of the dropped file is displayed.
Full tauri info output
$ npm run tauri info
> tauri-v2-drag-n-drop@0.0.0 tauri
> tauri info
[✔] Environment
- OS: Ubuntu 24.04 X64
✔ webkit2gtk-4.1: 2.44.0
✔ rsvg2: 2.58.0
✔ rustc: 1.78.0 (9b00956e5 2024-04-29)
✔ cargo: 1.78.0 (54d8815d0 2024-03-26)
✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
✔ Rust toolchain: stable-aarch64-unknown-linux-gnu (default)
- node: 20.13.0
- npm: 10.5.2
[-] Packages
- tauri [RUST]: 2.0.0-beta.18
- tauri-build [RUST]: 2.0.0-beta.14
- wry [RUST]: 0.39.4
- tao [RUST]: 0.27.1
- @tauri-apps/api [NPM]: 2.0.0-beta.11
- @tauri-apps/cli [NPM]: 2.0.0-beta.16
[-] App
- build-type: bundle
- CSP: unset
- frontendDist: ../dist
- devUrl: http://localhost:1420/
- bundler: Vite
Stack trace
No response
Additional context
No response
Describe the bug
As far as we know, by default, Tauri handles drag-n-drop via its own
tauri://dropand related events.While in Linux (both Ubuntu 22.04 and 24.04), once a file is dropped onto the window, an
tauri://drag-cancelledis emitted instead, and the webview is unexpectedly navigated to the dropped file.Reproduction
Link: https://github.com/xingrz/tauri-v2-drag-n-drop
Consoletab. EnablePreserve LogAs its shown in the screenshot below,
tauri://drag-cancelledis emitted, and the webview is navigated to the file (package.json) just dropped.Expected behavior
A
tauri://dropshould be emitted. In the above minimal reproduction, size of the dropped file is displayed.Full
tauri infooutputStack trace
No response
Additional context
No response