Skip to content

Commit

Permalink
Fix typing into start to open search
Browse files Browse the repository at this point in the history
  • Loading branch information
DustinBrett committed Nov 9, 2023
1 parent 565f86f commit c879815
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions components/system/StartMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,18 @@ const StartMenu: FC<StartMenuProps> = ({ toggleStartMenu }) => {
else if (key.length === 1) {
toggleStartMenu(false);

const searchButton = document.querySelector(
`main > nav > button[aria-label='${SEARCH_BUTTON_LABEL}']`
) as HTMLButtonElement;
const searchButton = document.querySelector<HTMLButtonElement>(
`main > nav > div[aria-label='${SEARCH_BUTTON_LABEL}']`
);

if (searchButton) {
searchButton.click();

let tries = 0;
const openSearchTimerRef = window.setInterval(() => {
const searchInput = document.querySelector(
`main > nav .search > input`
) as HTMLInputElement;
const searchInput = document.querySelector<HTMLInputElement>(
"main > nav .search > input"
);

if (searchInput) {
updateInputValueOnReactElement(searchInput, key);
Expand Down

0 comments on commit c879815

Please sign in to comment.