Browse Source

Fix lost_focus for TextEdit widgets

Closes https://github.com/emilk/egui/issues/565
pull/621/head
Emil Ernerfeldt 3 years ago
parent
commit
2f46b0eb06
  1. 2
      egui/src/widgets/text_edit.rs

2
egui/src/widgets/text_edit.rs

@ -390,7 +390,7 @@ impl<'t, S: TextBuffer> Widget for TextEdit<'t, S> {
ui.allocate_rect(frame_rect, Sense::hover());
let frame_response = ui.interact(frame_rect, id, Sense::click());
let response = response | frame_response;
if response.clicked() {
if response.clicked() && !response.lost_focus() {
ui.memory().request_focus(response.id);
}

Loading…
Cancel
Save