1
0
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:
Emil Ernerfeldt
2021-08-15 17:52:53 +02:00
parent e31312cf7a
commit 2f46b0eb06

View File

@@ -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);
}