From 38ee7c4923c2468f19c2a3a2bc9964dd986c7cf9 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Tue, 18 Jul 2023 12:36:28 +0200 Subject: [PATCH] Use non-passive input event handlers in todomvc --- crates/xilem_html/web_examples/todomvc/src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/xilem_html/web_examples/todomvc/src/main.rs b/crates/xilem_html/web_examples/todomvc/src/main.rs index 567d0585..33b2bbb5 100644 --- a/crates/xilem_html/web_examples/todomvc/src/main.rs +++ b/crates/xilem_html/web_examples/todomvc/src/main.rs @@ -64,6 +64,7 @@ fn todo_item(todo: &mut Todo, editing: bool) -> impl View + Vi state.title_editing.push_str(&evt.target().value()); evt.prevent_default(); }) + .passive(false) .on_blur(|_, _| TodoAction::CancelEditing), )) .attr("class", class) @@ -202,7 +203,8 @@ fn app_logic(state: &mut AppState) -> impl View { .on_input(|state: &mut AppState, evt| { state.update_new_todo(&evt.target().value()); evt.prevent_default(); - }), + }) + .passive(false), )) .attr("class", "header"), main,