UI: Fix L/R to switch tabs

Resolves #645
This commit is contained in:
Luke Street
2026-05-03 18:36:06 -06:00
parent 7fbfe5ad88
commit c774f53dad
+4 -1
View File
@@ -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) {