-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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!: fix TextInput paddingOut not based on lineHeight when provided #2621
Conversation
@brunohkbx @jbinda Any news on this ? |
@brunohkbx You can try it out here on real android device, you'll see that smiley's are cut, it also sometimes happen with some fonts: https://snack.expo.io/@magrin_j/react-native-paper-text-input-line-height-problem To fix this current issue, my PR fix the There is also another problem happening with latest release when you have a big roundness, the label background is cutting out the border line on top and on bottom. This other problem is not fixed in this PR, but I'll try to take a look later and create a new PR if I find a solution. |
@brunohkbx Any news on this ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@magrinj sorry for taking so long to answer.
So I tested in both Android and iOS and your changes look good.
iOS
Before | After |
---|---|
Android
Before | After |
---|---|
@brunohkbx Perfect ! Thanks for the fix 🙂 |
Hi, When this fix will be updated on NPM? |
Summary
When using a
TextInput
inoutlined
mode text can be cut on some device, especially on Android.This is due to the fact that
adjustPaddingOut
is only based onfontSize
, and even if you passlineHeight
in the style to avoid this, this one is not used.So, to prevent this issue
adjustPaddingOut
is now based onlineHeight
when this one is provided.Test plan
Before:
After: