mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -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);
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user