Fix lost_focus for TextEdit widgets
Closes https://github.com/emilk/egui/issues/565
This commit is contained in:
parent
e31312cf7a
commit
2f46b0eb06
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue