Skip to content

Commit

Permalink
Fix touch screen defocus bug
Browse files Browse the repository at this point in the history
Fixes #288
  • Loading branch information
emilk committed Apr 12, 2021
1 parent 5d50fa1 commit 4ecf304
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ NOTE: [`eframe`](eframe/CHANGELOG.md), [`egui_web`](egui_web/CHANGELOG.md) and [
### Added ⭐
* Make labels interactive with `Label::sense(Sense::click())`.

### Fixed 🐛
* Fix [defocus-bug on touch screens](https://github.com/emilk/egui/issues/288)

## 0.11.0 - 2021-04-05 - Optimization, screen reader & new layout logic

### Added ⭐
Expand Down
2 changes: 1 addition & 1 deletion egui/src/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4ecf304

Please sign in to comment.