Fix touch screen defocus bug

Fixes https://github.com/emilk/egui/issues/288
This commit is contained in:
Emil Ernerfeldt
2021-04-12 21:41:07 +02:00
parent 5d50fa1350
commit 4ecf304335
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -146,7 +146,7 @@ impl Response {
// even if we aren't clickable. This is important for windows and such that should close
// then the user clicks elsewhere.
let pointer = &self.ctx.input().pointer;
if let Some(pos) = pointer.latest_pos() {
if let Some(pos) = pointer.interact_pos() {
pointer.any_click() && !self.rect.contains(pos)
} else {
false