Skip to content

Commit af76f4a

Browse files
authored
Prevent input field from focusing on touch devices rather than mobile (#6105)
1 parent 15bf28d commit af76f4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/v2.5/src/components/List/Filters/FilterSidebar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ export const FilteredSidebarHeader: React.FC<{
3030
const [, setFocus] = focus;
3131

3232
// Set the focus on the input field when the sidebar is opened
33-
// Don't do this on mobile devices
33+
// Don't do this on touch devices
3434
useEffect(() => {
35-
if (sidebarOpen && !ScreenUtils.isMobile()) {
35+
if (sidebarOpen && !ScreenUtils.isTouch()) {
3636
setFocus();
3737
}
3838
}, [sidebarOpen, setFocus]);

0 commit comments

Comments
 (0)