forge
forge copied to clipboard
🐛 Mobile: Bottom navigation doesn't hide when chat input is focused
Bug Description
On mobile devices, when the user taps into the chat input box, the bottom navigation menu remains visible instead of hiding to make room for the keyboard. This blocks content and creates a poor UX.
Expected behavior: Bottom navigation should hide when input is focused, and reappear when focus is lost.
Actual behavior: Navigation stays visible at all times.
Root Causes
- No keyboard visibility detection in mobile layout
isTextareaFocusedstate inTaskFollowUpSectionisn't used to control navigation visibilityBottomNavigationcomponent always renders whenshowBottomNavprop is true- No event listeners to detect input focus/blur at the layout level
Affected Components
frontend/src/components/mobile/MobileLayout.tsxfrontend/src/components/mobile/BottomNavigation.tsxfrontend/src/components/tasks/TaskFollowUpSection.tsxfrontend/src/pages/project-tasks.tsx
Proposed Solution
- Add keyboard visibility state to
MobileLayout - Hide
BottomNavigationwhen input is focused - Use CSS transitions for smooth hide/show animations
- Consider using
visualViewportAPI for accurate keyboard detection
Screenshot
Priority
Medium-High - Affects mobile UX significantly
Labels
mobile, bug, UX
@codex cn you confirm this bug is fixed?
Summary
- Added keyboard and focus detection in
MobileLayoutso the bottom navigation hides while inputs are active and spacing is released, preventing the keyboard from being obstructed on mobile. frontend/src/components/mobile/MobileLayout.tsxL32-L226 - Updated
BottomNavigationto accept controlled visibility with smooth transitions and disabled interactions when hidden. frontend/src/components/mobile/BottomNavigation.tsxL19-L105
Testing
- ❌
npm run frontend:lint(fails because existing ESLint warnings exceed the configured limit).