Skip to content

[Android] KeyboardProvider adds additional space above react-navigation header #967

@roancoetzee

Description

@roancoetzee

Describe the bug

  • Adding the KeyboardProvider on Android causes the react-navigation headers to increase in size. When the KeyboardProvider is removed the headers return to their default size.
  • Issues starts with Android 13+. On Android 12 and below it works as expected.
  • iOS doesn't appear to be affected.

Code snippet
See index.js from the example repo on how the KeyboardProvider is added. It is worth noting that the order in which the KeyboardProvider is being added doesn't seem to make a difference.

Repo for reproducing
Repo

To Reproduce
Steps to reproduce the behavior:

On Android 13+

  1. Run the app on an Android (Emulator or Device).
  2. Take note of the "Home" (green) header size.
  3. Comment out the KeyboardProvider in index.js and rebuild/restart the app. Hot reloading doesn't always trigger a change.

Expected behavior
See the screenshots below for more context. We expect the header size to not change when the KeyboardProvider is added.

Screenshots



**Smartphone **

  • Desktop OS: [MacOS 15.3.1]
  • Device: [Android]
  • OS: [Android 13+]
  • RN version: [0.79.3]
  • RN architecture: [new]
  • JS engine: [Hermes]
  • Library version: [1.17.3]

Additional context
I was unsure whether to post this issue here or in the react-navigation repo but when I came across this comment I thought this would be a good place to start given that it only happens when I introduce the KeyboardProvider. However I am happy to move this if we are sure this is a react-navigation issue?

Metadata

Metadata

Assignees

Labels

questionYou wanted to clarify something about the usage of the library or have a question about something🤖 androidAndroid specific

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions