From a1a073bd2c88578d1a4fa1c2edeabf962a29d3ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 24 Apr 2026 14:13:33 +0200 Subject: [PATCH] Tab interactions: Make it possible to scroll tabs without activating them, by handling TouchInputFlags::UP/CANCEL properly. --- Common/UI/View.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Common/UI/View.cpp b/Common/UI/View.cpp index fdbebeed6d..fe54afe42a 100644 --- a/Common/UI/View.cpp +++ b/Common/UI/View.cpp @@ -344,7 +344,6 @@ bool Clickable::Key(const KeyInput &key) { bool StickyChoice::Touch(const TouchInput &touch) { bool contains = bounds_.Contains(touch.x, touch.y); - dragging_ = false; if (!IsEnabled()) { down_ = false; return contains; @@ -352,12 +351,18 @@ bool StickyChoice::Touch(const TouchInput &touch) { if (touch.flags & TouchInputFlags::DOWN) { if (contains) { + dragging_ = true; + } + } + if (touch.flags & TouchInputFlags::UP) { + if (dragging_ && contains && !(touch.flags & TouchInputFlags::CANCEL)) { if (IsFocusMovementEnabled()) SetFocusedView(this); - down_ = true; ClickInternal(); + dragging_ = false; return true; } + dragging_ = false; } return false; }