Skip to content

Commit

Permalink
Do not override default event handling in WASM, so users can for exam…
Browse files Browse the repository at this point in the history
…ple still refresh the page with F5
  • Loading branch information
NiklasEi committed Jul 28, 2023
1 parent 7f7fd4c commit 8d18c44
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 8d18c44

Please sign in to comment.