KeyboardAvoidingView Leaves Extra Bottom Padding After Keyboard Closes
### Description ### **Description** When using KeyboardAvoidingView with behavior="height" on Android in combination with SafeAreaView and useSafeAreaInsets(), remains even after the keyboard closes, leaving an unexpected gap at the bottom of the screen. This issue is more visible on Android devices without soft navigation buttons. This behavior is inconsistent with iOS, where the padding collapses as expected. **Expected Behavior** When the keyboard closes, the layout should return to its original state, removing any bottom padding unless explicitly added by the developer. **Actual Behavior** After the keyboard closes on Android, an extra bottom padding remains on the screen, pushing up content unnecessarily. Removing paddingBottom: insets.bottom fixes it, but this breaks devices with safe area (iOS or gesture nav Android) where insets are needed. ### Steps to reproduce ### **Steps To Reproduce** 1. Create a SafeAreaView wrapping a KeyboardAvoidingView (behavior="height"). 2. Inside, render a FlatList and an input box pinned to the bottom. 3. Open keyboard → input shifts correctly. 4. Close keyboard → padding remains, leaving gap at bottom. `<SafeAreaView style={{flex: 1}}> <KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'padding' : 'height'} style={{ flex: 1, paddingTop: insets.top, }}> <View style={[ {flex: 1}, theme == 'dark' ? {backgroundColor: App
Posted by ChinmayLale on Jul 15, 2025, 8:33 AM
Tags
Related issues
- 2026 - Microsoft Office 365
- [Ubuntu] `ubuntu-latest` label will use Ubuntu 26.04 in November 2026
- Gamut mapping
- [Codex Desktop] Editing and resending a queued message triggers "App-server queued follow-up no longer exists"
- [Windows] ChatGPT 26.820.60940 fails with "invalid transport in mcp_servers.codex_app"; Beta 26.727.40816 works
- [BUG]: infinite loading of videos
Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments
github (SaaS)
2026 - Microsoft Office 365
[Ubuntu] `ubuntu-latest` label will use Ubuntu 26.04 in November 2026
Gamut mapping
[Codex Desktop] Editing and resending a queued message triggers "App-server queued follow-up no longer exists"
[Windows] ChatGPT 26.820.60940 fails with "invalid transport in mcp_servers.codex_app"; Beta 26.727.40816 works
[BUG]: infinite loading of videos
Restore GPT-5.6 Sol’s 372k Codex context window, or provide an opt-in setting
Codex Desktop for macOS repeatedly triggers `syspolicyd` / `trustd` CPU and memory runaway
KeyboardAvoidingView Leaves Extra Bottom Padding After Keyboard Closes
### Description ### **Description** When using KeyboardAvoidingView with behavior="height" on Android in combination with SafeAreaView and useSafeAreaInsets(), remains even after the keyboard closes, leaving an unexpected gap at the bottom of the screen. This issue is more visible on Android devices without soft navigation buttons. This behavior is inconsistent with iOS, where the padding collapses as expected. **Expected Behavior** When the keyboard closes, the layout should return to its original state, removing any bottom padding unless explicitly added by the developer. **Actual Behavior** After the keyboard closes on Android, an extra bottom padding remains on the screen, pushing up content unnecessarily. Removing paddingBottom: insets.bottom fixes it, but this breaks devices with safe area (iOS or gesture nav Android) where insets are needed. ### Steps to reproduce ### **Steps To Reproduce** 1. Create a SafeAreaView wrapping a KeyboardAvoidingView (behavior="height"). 2. Inside, render a FlatList and an input box pinned to the bottom. 3. Open keyboard → input shifts correctly. 4. Close keyboard → padding remains, leaving gap at bottom. `<SafeAreaView style={{flex: 1}}> <KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'padding' : 'height'} style={{ flex: 1, paddingTop: insets.top, }}> <View style={[ {flex: 1}, theme == 'dark' ? {backgroundColor: App
Comments (0)
No comments yet. Start the discussion.