From 340601f5267c919e35882e3203ad4e732a0aca33 Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Sun, 27 Jun 2021 00:09:43 +0100 Subject: [PATCH] don't check bounds on lift because seems buggy --- native/src/widget/button.rs | 5 ++--- native/src/widget/toggler.rs | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/native/src/widget/button.rs b/native/src/widget/button.rs index 9e779669..88c6feb2 100644 --- a/native/src/widget/button.rs +++ b/native/src/widget/button.rs @@ -256,9 +256,8 @@ where } } touch::Event::FingerLifted { id, position } => { - if self.fingers_mid_press.remove(&id) - && layout.bounds().contains(position) - { + // !!! The finger position seems to be buggy on the Lift event. + if self.fingers_mid_press.remove(&id) { eprintln!("lifted"); // this should be treated as a click if let Some(on_press) = self.on_press.clone() { diff --git a/native/src/widget/toggler.rs b/native/src/widget/toggler.rs index 17405219..bf8b2a39 100644 --- a/native/src/widget/toggler.rs +++ b/native/src/widget/toggler.rs @@ -201,8 +201,9 @@ where } } touch::Event::FingerLifted { id, position } => { + // !!! The finger position seems to be buggy on the Lift event. if self.fingers_mid_press.remove(&id) - && layout.bounds().contains(position) + // && layout.bounds().contains(position) { // this should be treated as a click messages.push((self.on_toggle)(!self.is_active));