Remove keyboard focus from a widget if something else is dragged
Closes https://github.com/emilk/egui/issues/618
This commit is contained in:
parent
753d709d3d
commit
b00edfe97f
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue