mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 06:40:06 -04:00
Remove keyboard focus from a widget if something else is dragged
Closes https://github.com/emilk/egui/issues/618
This commit is contained in:
@@ -301,6 +301,11 @@ impl CtxRef {
|
|||||||
memory.surrender_focus(id);
|
memory.surrender_focus(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if response.dragged() && !memory.has_focus(response.id) {
|
||||||
|
// e.g.: remove focus from a widget when you drag something else
|
||||||
|
memory.stop_text_input();
|
||||||
|
}
|
||||||
|
|
||||||
response
|
response
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user