Skip to content

Commit

Permalink
fix(tabs): change focus with key arrow
Browse files Browse the repository at this point in the history
  • Loading branch information
skhamvon authored and dpellier committed Jan 16, 2024
1 parent 1e1eb3d commit 006d4f6
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ class OdsTabsController {
if (event.code === 'ArrowLeft') {
const previousPanel = this.tabItems[currentSelectedTabIndex - 1].getAttribute('panel');
this.changeActivePanel(previousPanel!);
this.tabItems.find((tab) => tab.panel === previousPanel )!.focus();
} else {
const nextPanel = this.tabItems[currentSelectedTabIndex + 1].getAttribute('panel');
this.changeActivePanel(nextPanel!);
this.tabItems.find((tab) => tab.panel === nextPanel )!.focus();
}
}
}
Expand Down

0 comments on commit 006d4f6

Please sign in to comment.