Skip to content

Commit

Permalink
Merge branch 'master' into tooltip-data
Browse files Browse the repository at this point in the history
  • Loading branch information
zvonimirfras authored Apr 11, 2024
2 parents 3aff875 + fa59676 commit b9c5fc7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/table/table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,10 @@ export class Table implements AfterViewInit, OnDestroy {

static focus(element: HTMLElement) {
const focusElementList = getFocusElementList(element, tabbableSelectorIgnoreTabIndex);
if (element.firstElementChild && element.firstElementChild.classList.contains("cds--table-sort") && focusElementList.length > 1) {
focusElementList[1].focus();
} else if (focusElementList.length > 0) {
if (
(element.firstElementChild?.classList.contains("cds--table-sort") && focusElementList.length > 1) ||
focusElementList.length > 0
) {
focusElementList[0].focus();
} else {
element.focus();
Expand Down

0 comments on commit b9c5fc7

Please sign in to comment.