prevent the reload shortcut on windows (#2654)

This commit is contained in:
Evan Almloff authored and GitHub committed 2024-07-23 10:58:17 -07:00
1 parent 52656348d5
commit 1dcfc44c23
1 file changed
+7
+7
View File
@@ -142,6 +142,13 @@ impl WebviewInstance {
WebViewBuilder::new_gtk(vbox)
};
// Disable the webview default shortcuts to disable the reload shortcut
#[cfg(target_os = "windows")]
{
use wry::WebViewBuilderExtWindows;
webview = webview.with_browser_accelerator_keys(false);
}
webview = webview
.with_transparent(cfg.window.window.transparent)
.with_url("dioxus://index.html/")