mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Prevent input field from focusing on touch devices rather than mobile (#6105)
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user