fix(core): disable tao's drag-n-drop based on fileDropEnabled, closes #4580 (#4592)

Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.studio>
This commit is contained in:
Amr Bashir 2022-07-05 03:29:54 +02:00 committed by GitHub
parent c02337be29
commit a1d569bbc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,5 @@
---
"tauri-runtime-wry": "patch"
---
Disable drag-n-drop of tao based on `fileDropEnabled` value.

View File

@ -2844,6 +2844,12 @@ fn create_webview<T: UserEvent>(
{
window_builder.inner = window_builder.inner.with_fullsize_content_view(true);
}
#[cfg(windows)]
{
window_builder.inner = window_builder
.inner
.with_drag_and_drop(webview_attributes.file_drop_handler_enabled);
}
let is_window_transparent = window_builder.inner.window.transparent;
let menu_items = if let Some(menu) = window_builder.menu {