1
0
Эх сурвалжийг харах

prevent the reload shortcut on windows (#2654)

Evan Almloff 11 сар өмнө
parent
commit
1dcfc44c23

+ 7 - 0
packages/desktop/src/webview.rs

@@ -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/")