diff options
-rw-r--r-- | examples/todos/src/main.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/todos/src/main.rs b/examples/todos/src/main.rs index be48ae8c..690d9c09 100644 --- a/examples/todos/src/main.rs +++ b/examples/todos/src/main.rs @@ -131,7 +131,11 @@ impl Application for Todos { task.update(task_message); if should_focus { - text_input::focus(Task::text_input_id(i)) + let id = Task::text_input_id(i); + Command::batch(vec![ + text_input::focus(id.clone()), + text_input::select_all(id), + ]) } else { Command::none() } |