fix: drag-drop MIDI from Explorer on Windows — disable Tauri drag_drop_handler so WebView2 gets HTML5 DnD (Phương án A, FIX_DRAG_DROP_WINDOWS.md) (V10)
This commit is contained in:
@@ -295,6 +295,19 @@ pub fn run() {
|
||||
restart_bridge_with_sample_rate
|
||||
])
|
||||
.setup(|app| {
|
||||
// V10 (FIX_DRAG_DROP_WINDOWS): disable Tauri's built-in drag-drop
|
||||
// handler so WebView2 receives OS file drops (HTML5 DnD works).
|
||||
// Tauri default handler + SetAllowExternalDrop(false) swallows
|
||||
// Explorer .mid drops — app.jsx onDrop never fires on Windows.
|
||||
// Builder-only API, so the main window is created here instead of
|
||||
// tauri.conf.json (config-declared windows cannot disable it).
|
||||
let _ = tauri::WebviewWindowBuilder::new(app, "main", tauri::WebviewUrl::default())
|
||||
.title("Sonic Forge DAW - Professional Desktop Studio")
|
||||
.inner_size(1440.0, 900.0)
|
||||
.resizable(true)
|
||||
.devtools(true)
|
||||
.disable_drag_drop_handler()
|
||||
.build()?;
|
||||
let res_dir = app
|
||||
.path()
|
||||
.resource_dir()
|
||||
|
||||
@@ -9,16 +9,6 @@
|
||||
},
|
||||
"app": {
|
||||
"withGlobalTauri": true,
|
||||
"windows": [
|
||||
{
|
||||
"title": "Sonic Forge DAW - Professional Desktop Studio",
|
||||
"width": 1440,
|
||||
"height": 900,
|
||||
"resizable": true,
|
||||
"fullscreen": false,
|
||||
"devtools": true
|
||||
}
|
||||
],
|
||||
"security": {
|
||||
"csp": null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user