Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Commit

Permalink
Testing ..activate() over .foucs()
Browse files Browse the repository at this point in the history
  • Loading branch information
clmedders committed Feb 20, 2024
1 parent e1a2434 commit 633e870
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions assets/scripts/state-selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@
stateListResults.find((element, index) => {
if (element === option) {
if (index === 0) {
stateInput.focus();
stateInput.activate();
}
else {
stateListResults[index - 1].focus();
stateListResults[index - 1].activate();
}
}
});
Expand All @@ -88,10 +88,10 @@
stateListResults.find((element, index) => {
if (element === option) {
if (index === stateListResults.length - 1) {
stateListResults[0].focus();
stateListResults[0].activate();
}
else {
stateListResults[index + 1].focus();
stateListResults[index + 1].activate();
}
}
});
Expand Down

0 comments on commit 633e870

Please sign in to comment.