Fixed mobile search menu bug

This commit is contained in:
Prozilla 2023-08-11 19:49:25 +02:00
parent 2695e78344
commit ae5056cd64
No known key found for this signature in database
GPG key ID: 5858DFE71CAF31EE
2 changed files with 4 additions and 1 deletions

View file

@ -84,6 +84,7 @@ export function Taskbar() {
if (inputRef.current) {
inputRef.current.focus();
window.scrollTo(0, document.body.scrollHeight);
}
} else {
setTimeout(() => {

View file

@ -25,8 +25,10 @@ export function SearchMenu({ active, setActive, searchQuery, setSearchQuery, inp
}, [active]);
useEffect(() => {
if (inputRef.current)
if (inputRef.current) {
inputRef.current.focus();
window.scrollTo(0, document.body.scrollHeight);
}
}, [inputRef]);
useEffect(() => {