mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 08:26:00 +01:00
Prevent input field from focusing on touch devices rather than mobile (#6105)
This commit is contained in:
parent
15bf28d5be
commit
af76f4a24a
1 changed files with 2 additions and 2 deletions
|
|
@ -30,9 +30,9 @@ export const FilteredSidebarHeader: React.FC<{
|
|||
const [, setFocus] = focus;
|
||||
|
||||
// Set the focus on the input field when the sidebar is opened
|
||||
// Don't do this on mobile devices
|
||||
// Don't do this on touch devices
|
||||
useEffect(() => {
|
||||
if (sidebarOpen && !ScreenUtils.isMobile()) {
|
||||
if (sidebarOpen && !ScreenUtils.isTouch()) {
|
||||
setFocus();
|
||||
}
|
||||
}, [sidebarOpen, setFocus]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue