diff --git a/crates/egui/src/widgets/text_edit/builder.rs b/crates/egui/src/widgets/text_edit/builder.rs index 86d281256..2a6eb14c6 100644 --- a/crates/egui/src/widgets/text_edit/builder.rs +++ b/crates/egui/src/widgets/text_edit/builder.rs @@ -576,7 +576,7 @@ impl<'t> TextEdit<'t> { is_being_dragged, ); - if did_interact { + if did_interact || response.clicked() { ui.memory_mut(|mem| mem.request_focus(response.id)); } }