fix: Android PWA keyboard bottom row clipping#140
Conversation
On Android PWAs, the system gesture bar overlaps app content but env(safe-area-inset-bottom) reports 0, unlike iOS which correctly reports safe area insets. This causes the bottom keyboard row to be hidden behind the gesture bar in standalone mode. Add a @media (display-mode: standalone) rule that ensures a minimum 12px bottom padding via max(env(safe-area-inset-bottom), 12px). On iOS where the inset is already correct (e.g. 34px), max() picks the larger value so nothing changes.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTwo CSS files receive identical defensive fallback modifications for safe-area-insets in standalone PWA display mode. Each file adds a media query that applies max(env(safe-area-inset-bottom), 12px) padding to the safe-area-inset class, ensuring minimum padding to prevent keyboard clipping on Android devices. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
env(safe-area-inset-bottom)reports0(unlike iOS which correctly reports safe area insets)@media (display-mode: standalone)rule withpadding-bottom: max(env(safe-area-inset-bottom), 12px)as a fallbackmax()picks the larger value so nothing changesContext
We've gone back and forth between
100svhand100dvhin recent PRs (#138, commits 0155c09, 6eb3a7d). Neither viewport unit solves this because they account for browser chrome, not the Android system navigation/gesture bar. This fix targets the actual root cause.Test plan
@coderabbitai review
Summary by CodeRabbit