From c774f53dad9b197cc674e69ffeb7e1cd9d12c117 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Sun, 3 May 2026 18:36:06 -0600 Subject: [PATCH] UI: Fix L/R to switch tabs Resolves #645 --- src/dusk/ui/tab_bar.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dusk/ui/tab_bar.cpp b/src/dusk/ui/tab_bar.cpp index 5d19d22b27..debc6bc992 100644 --- a/src/dusk/ui/tab_bar.cpp +++ b/src/dusk/ui/tab_bar.cpp @@ -169,7 +169,10 @@ bool TabBar::handle_nav_command(Rml::Event& event, NavCommand cmd) { cmd == NavCommand::Previous) { bool isNext = cmd == NavCommand::Right || cmd == NavCommand::Next; - int currentComponent = tab_containing(event.GetTargetElement()); + int currentComponent = mProps.selectedTabIndex; + if (cmd == NavCommand::Left || cmd == NavCommand::Right) { + currentComponent = tab_containing(event.GetTargetElement()); + } int direction = isNext ? 1 : -1; int i = currentComponent + direction; if (currentComponent == -1) {