Fix touch screen defocus bug
Fixes https://github.com/emilk/egui/issues/288
This commit is contained in:
parent
5d50fa1350
commit
4ecf304335
2 changed files with 4 additions and 1 deletions
|
@ -10,6 +10,9 @@ NOTE: [`eframe`](eframe/CHANGELOG.md), [`egui_web`](egui_web/CHANGELOG.md) and [
|
||||||
### Added ⭐
|
### Added ⭐
|
||||||
* Make labels interactive with `Label::sense(Sense::click())`.
|
* 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
|
## 0.11.0 - 2021-04-05 - Optimization, screen reader & new layout logic
|
||||||
|
|
||||||
### Added ⭐
|
### Added ⭐
|
||||||
|
|
|
@ -146,7 +146,7 @@ impl Response {
|
||||||
// even if we aren't clickable. This is important for windows and such that should close
|
// even if we aren't clickable. This is important for windows and such that should close
|
||||||
// then the user clicks elsewhere.
|
// then the user clicks elsewhere.
|
||||||
let pointer = &self.ctx.input().pointer;
|
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)
|
pointer.any_click() && !self.rect.contains(pos)
|
||||||
} else {
|
} else {
|
||||||
false
|
false
|
||||||
|
|
Loading…
Reference in a new issue