Skip to content

Commit

Permalink
setindex
Browse files Browse the repository at this point in the history
  • Loading branch information
scomea committed Jan 17, 2024
1 parent 1b29f6b commit 40552ee
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/web-components/fast-foundation/src/tabs/tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,12 @@ export class FASTTabs extends FASTElement {
) {
return;
}
const targetTab = this.tabs.find(tab => tab.id === this.activeid);
if (targetTab) {
this.activeid = targetTab.id;
const targetTabId: string = this.tabOrder[index];
const tabElement: HTMLElement | undefined = this.tabs.find(
(tab: HTMLElement) => tab.id === targetTabId
);
if (tabElement && this.isFocusableElement(tabElement)) {
this.activeid = tabElement.id;
}
}

Expand Down

0 comments on commit 40552ee

Please sign in to comment.