mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
fix(core): fileDropEnabled option is not working when creating a new WebviewWindow (#4146)
This commit is contained in:
5
.changes/fix-window-file-drop-enabled.md
Normal file
5
.changes/fix-window-file-drop-enabled.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Fixes `fileDropEnabled` option not working.
|
||||
@@ -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 =
|
||||
<<R::Dispatcher as Dispatch<crate::EventLoopMessage>>::WindowBuilder>::with_config(*options);
|
||||
builder.build().map_err(crate::error::into_anyhow)?;
|
||||
|
||||
Reference in New Issue
Block a user