Skip to content

Commit 706fcbd

Browse files
authored
fix(core): fileDropEnabled option is not working when creating a new WebviewWindow (#4146)
1 parent 8e1daad commit 706fcbd

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch
3+
---
4+
5+
Fixes `fileDropEnabled` option not working.

core/tauri/src/endpoints/window.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,13 @@ impl Cmd {
204204
) -> super::Result<()> {
205205
let label = options.label.clone();
206206
let url = options.url.clone();
207+
let file_drop_enabled = options.file_drop_enabled;
207208

208209
let mut builder = crate::window::Window::builder(&context.window, label, url);
210+
if !file_drop_enabled {
211+
builder = builder.disable_file_drop_handler();
212+
}
213+
209214
builder.window_builder =
210215
<<R::Dispatcher as Dispatch<crate::EventLoopMessage>>::WindowBuilder>::with_config(*options);
211216
builder.build().map_err(crate::error::into_anyhow)?;

0 commit comments

Comments
 (0)