Skip to content

Commit

Permalink
Fix detection of search bar focus (#1450)
Browse files Browse the repository at this point in the history
  • Loading branch information
arielj authored Jun 10, 2022
1 parent ba2fa9d commit c95a6cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/UI/SearchBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default function SearchBar() {
ref={input}
data-testid="searchInput"
placeholder={t('search')}
id="search"
id="search" // this id is used for the virtualkeyboard, don't change it
className="FormControl__input"
/>
</FormControl>
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/gamepad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export const initGamepad = () => {
const el = currentElement()
if (!el) return false

return el.classList.contains('searchInput')
return el.id === 'search'
}

function playable() {
Expand Down

0 comments on commit c95a6cd

Please sign in to comment.