Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useAnimatedKeyboard causes navigation bar jump with React Navigation on Android #6906

Open
alexmngn opened this issue Jan 16, 2025 · 0 comments
Labels
Platform: Android This issue is specific to Android Repro provided A reproduction with a snippet of code, snack or repo is provided

Comments

@alexmngn
Copy link

alexmngn commented Jan 16, 2025

Description

My navigation bar unexpectedly jumps or shifts when transitioning to a screen implementing useAnimatedKeyboard on Android. This issue disappears when the hook is removed.

Video demo

With useAnimatedKeyboard

Kapture.2025-01-16.at.10.44.42.mp4

Without useAnimatedKeyboard

Kapture.2025-01-16.at.10.45.33.mp4

The only code change between those 2 videos was removing this line in the screen I transitioned to.

const keyboard = useAnimatedKeyboard();

I was able to reproduce the issue on a real device as well as on an Android emulator.

Steps to reproduce

1. Set up a project with React Navigation and Reanimated.
2. Add useAnimatedKeyboard to a component
3. Run the app and navigate to the screen implementing the hook.

Snack or a link to a repository

https://snack.expo.dev/@alexmngn/supportive-yellow-watermelon

Reanimated version

3.16.7

React Native version

0.75.4

React Navigation version

7.0.14

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native

Architecture

Paper (Old Architecture)

Build type

Debug app & dev bundle

Device

Android emulator
Real device

Device model

Galaxy A22

Acknowledgements

Yes

@github-actions github-actions bot added Platform: Android This issue is specific to Android Repro provided A reproduction with a snippet of code, snack or repo is provided Missing info The user didn't precise the problem enough and removed Missing info The user didn't precise the problem enough labels Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Android This issue is specific to Android Repro provided A reproduction with a snippet of code, snack or repo is provided
Projects
None yet
Development

No branches or pull requests

1 participant