Use non-passive input event handlers in todomvc

This commit is contained in:
Jonas Platte 2023-07-18 12:36:28 +02:00
parent d929001a8e
commit 38ee7c4923
1 changed files with 3 additions and 1 deletions

View File

@ -64,6 +64,7 @@ fn todo_item(todo: &mut Todo, editing: bool) -> impl View<Todo, TodoAction> + 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<AppState> {
.on_input(|state: &mut AppState, evt| {
state.update_new_todo(&evt.target().value());
evt.prevent_default();
}),
})
.passive(false),
))
.attr("class", "header"),
main,