Skip to content

Commit c95a6cd

Browse files
authored
Fix detection of search bar focus (#1450)
1 parent ba2fa9d commit c95a6cd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/UI/SearchBar/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default function SearchBar() {
4242
ref={input}
4343
data-testid="searchInput"
4444
placeholder={t('search')}
45-
id="search"
45+
id="search" // this id is used for the virtualkeyboard, don't change it
4646
className="FormControl__input"
4747
/>
4848
</FormControl>

src/helpers/gamepad.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export const initGamepad = () => {
181181
const el = currentElement()
182182
if (!el) return false
183183

184-
return el.classList.contains('searchInput')
184+
return el.id === 'search'
185185
}
186186

187187
function playable() {

0 commit comments

Comments
 (0)