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

Fix: Text keeps going upward and downward when entering a new line on Android #6170

Merged
merged 1 commit into from
Nov 9, 2024

Conversation

khuddite
Copy link
Contributor

@khuddite khuddite commented Nov 8, 2024

Fixes #5917

  1. Recording (before & after)
    before: android-before.webm
    after: android-after.webm

  2. Summary
    This issue is cosmetic and happens only on Android. The problem is that when users enter a new line and start typing, the height of the TextInput slightly increases for some reason. It can be annoying to sensitive users because the position of the entire text keeps going up and down.
    I did some research, and it seems setting includeFontPadding to false fixes the issue. This style is specific to Android and has no implications for iOS. I tested and confirmed this change doesn't affect iOS or other functionalities.
    https://reactnative.dev/docs/text-style-props#includefontpadding-android

@khuddite khuddite changed the title set includeFontPadding false for fixed TextInput height on Android Fix: Text keeps going upward and downward when entering a new line on Android Nov 8, 2024
Copy link
Collaborator

@gaearon gaearon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's try it

@gaearon gaearon merged commit a6d009d into bluesky-social:main Nov 9, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android: Text shifts upward when typing 4+ lines
2 participants