Skip to content

Commit 4ecf304

Browse files
committed
Fix touch screen defocus bug
Fixes #288
1 parent 5d50fa1 commit 4ecf304

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ NOTE: [`eframe`](eframe/CHANGELOG.md), [`egui_web`](egui_web/CHANGELOG.md) and [
1010
### Added ⭐
1111
* Make labels interactive with `Label::sense(Sense::click())`.
1212

13+
### Fixed 🐛
14+
* Fix [defocus-bug on touch screens](https://github.com/emilk/egui/issues/288)
15+
1316
## 0.11.0 - 2021-04-05 - Optimization, screen reader & new layout logic
1417

1518
### Added ⭐

egui/src/response.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl Response {
146146
// even if we aren't clickable. This is important for windows and such that should close
147147
// then the user clicks elsewhere.
148148
let pointer = &self.ctx.input().pointer;
149-
if let Some(pos) = pointer.latest_pos() {
149+
if let Some(pos) = pointer.interact_pos() {
150150
pointer.any_click() && !self.rect.contains(pos)
151151
} else {
152152
false

0 commit comments

Comments
 (0)