fix(web): prevent mobile keyboard from covering chat input (#403)

This commit is contained in:
Haoqing Wang
2026-04-06 05:39:40 +08:00
committed by GitHub
parent ea09663cdc
commit 1c8cb5c90d
4 changed files with 116 additions and 1 deletions
+4
View File
@@ -9,6 +9,7 @@ import { useServerUrl } from '@/hooks/useServerUrl'
import { useSSE } from '@/hooks/useSSE'
import { useSyncingState } from '@/hooks/useSyncingState'
import { usePushNotifications } from '@/hooks/usePushNotifications'
import { useViewportHeight } from '@/hooks/useViewportHeight'
import { useVisibilityReporter } from '@/hooks/useVisibilityReporter'
import { queryKeys } from '@/lib/query-keys'
import { AppContextProvider } from '@/lib/app-context'
@@ -58,6 +59,9 @@ function AppInner() {
initializeTheme()
}, [])
// Track visual viewport height for mobile keyboard avoidance (see useViewportHeight.ts)
useViewportHeight()
useEffect(() => {
const preventDefault = (event: Event) => {
event.preventDefault()