diff --git a/.changes/fix-window-file-drop-enabled.md b/.changes/fix-window-file-drop-enabled.md new file mode 100644 index 000000000..ee87e2e8d --- /dev/null +++ b/.changes/fix-window-file-drop-enabled.md @@ -0,0 +1,5 @@ +--- +"tauri": patch +--- + +Fixes `fileDropEnabled` option not working. diff --git a/core/tauri/src/endpoints/window.rs b/core/tauri/src/endpoints/window.rs index 0fdadeb94..36677e448 100644 --- a/core/tauri/src/endpoints/window.rs +++ b/core/tauri/src/endpoints/window.rs @@ -204,8 +204,13 @@ impl Cmd { ) -> super::Result<()> { let label = options.label.clone(); let url = options.url.clone(); + let file_drop_enabled = options.file_drop_enabled; let mut builder = crate::window::Window::builder(&context.window, label, url); + if !file_drop_enabled { + builder = builder.disable_file_drop_handler(); + } + builder.window_builder = <>::WindowBuilder>::with_config(*options); builder.build().map_err(crate::error::into_anyhow)?;