mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-07 08:07:18 +02:00
Focus the other button when reaching the beginning/end
This commit is contained in:
parent
2ae8452c90
commit
c796152bdd
@ -97,10 +97,11 @@ export class BxSelectElement {
|
|||||||
const disableNext = visibleIndex === $select.querySelectorAll('option').length - 1;
|
const disableNext = visibleIndex === $select.querySelectorAll('option').length - 1;
|
||||||
|
|
||||||
$btnPrev.classList.toggle('bx-inactive', disablePrev);
|
$btnPrev.classList.toggle('bx-inactive', disablePrev);
|
||||||
// disablePrev && document.activeElement === $btnPrev && $btnNext.focus();
|
|
||||||
|
|
||||||
$btnNext.classList.toggle('bx-inactive', disableNext);
|
$btnNext.classList.toggle('bx-inactive', disableNext);
|
||||||
// disableNext && document.activeElement === $btnNext &&$btnPrev.focus();
|
|
||||||
|
// Focus the other button when reaching the beginning/end
|
||||||
|
disablePrev && !disableNext && document.activeElement === $btnPrev && $btnNext.focus();
|
||||||
|
disableNext && !disablePrev && document.activeElement === $btnNext && $btnPrev.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
const normalizeIndex = (index: number): number => {
|
const normalizeIndex = (index: number): number => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user