feat: disable drop handler (#3680)

This commit is contained in:
Miles Murgaw authored and GitHub committed 2025-02-07 16:10:05 -08:00
1 parent 8b9e246044
commit 18feb0b38d
2 files changed
+14 -2

No files matched your search

+5 -2
View File
@@ -359,8 +359,11 @@ impl WebviewInstance {
}
}) // prevent all navigations
.with_asynchronous_custom_protocol(String::from("dioxus"), request_handler)
.with_web_context(&mut web_context)
.with_drag_drop_handler(file_drop_handler);
.with_web_context(&mut web_context);
if !cfg.disable_file_drop_handler {
webview = webview.with_drag_drop_handler(file_drop_handler);
}
if let Some(color) = cfg.background_color {
webview = webview.with_background_color(color);