From 8d18c44cdf897307ac59e691bf2b377b9df2032f Mon Sep 17 00:00:00 2001 From: Niklas Eicker Date: Fri, 28 Jul 2023 07:15:38 +0200 Subject: [PATCH] Do not override default event handling in WASM, so users can for example still refresh the page with F5 --- src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.rs b/src/main.rs index e8857bf..aa441e6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,7 +17,10 @@ fn main() { primary_window: Some(Window { title: "Bevy game".to_string(), // ToDo resolution: (800., 600.).into(), + // Bind to canvas included in `index.html` canvas: Some("#bevy".to_owned()), + // Tells wasm not to override default event handling, like F5 and Ctrl+R + prevent_default_event_handling: false, ..default() }), ..default()