Skip to content

Commit

Permalink
(fix) timepicker refinement: change tabindex by element property
Browse files Browse the repository at this point in the history
  • Loading branch information
gselderslaghs committed Oct 29, 2024
1 parent 2c0f065 commit 2abdbe8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/timepicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ export class Timepicker extends Component<TimepickerOptions> {
this.options.onOpenStart.call(this);
}
this.modalEl.querySelectorAll('.btn').forEach((e: HTMLButtonElement) => {
if (e.style.visibility !== 'hidden') e.setAttribute('tabindex', '0');
if (e.style.visibility !== 'hidden') e.tabIndex = 0;
});
},
onOpenEnd: this.options.onOpenEnd,
Expand All @@ -375,7 +375,7 @@ export class Timepicker extends Component<TimepickerOptions> {
this.options.onCloseStart.call(this);
}
this.modalEl.querySelectorAll('.btn').forEach((e: HTMLButtonElement) => {
e.setAttribute('tabindex', '-1');
e.tabIndex = -1;
});
},
onCloseEnd: () => {
Expand Down

0 comments on commit 2abdbe8

Please sign in to comment.