mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
Fix lost_focus for TextEdit widgets
Closes https://github.com/emilk/egui/issues/565
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user