-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
TextInput does not respect allowFontScaling=false on Android #17898
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Same issue with RN 56.0 |
Guys, I faced with the same problem. I created this lib for resolving this issue in my project. Maybe it will help you: https://github.com/NelGarbuzova/react-native-stylized-placeholder |
Am on RN However, the placeholder text in TextInput does not work correctly and still scales. |
For fixing the placeholder font scaling change @NelGarbuzova library works but for the input text part the workaround is to -
It will fix your fontSize and won't change because of system settings for both iOS and Android. For this workaround don't set allowTextScaling to false in TextInput. |
Hello there 👋 this issue seems to have been inactive for the past few weeks. Because of this, it's likely that the issue is not a high priority anymore or it has been solved by OP; for these reasons, we'll close it. But please, if it's actually still an issue with 0.59 please comment below and we can reopen it or please send us a Pull Request with a fix 😊 |
@anirudha-ani solution works well but it's still an issue on RN 0.59.8 |
It's still an issue in 0.59.10 Suddenly the app's text size if very large on devices that have a larger then default font size. |
use this way at the top of your root component:
|
Still not resolved, yet it is closed :/ |
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
Environment:
OS: macOS High Sierra 10.13.4
Node: 8.4.0
Yarn: 1.6.0
npm: 5.4.2
Watchman: 4.9.0
Xcode: Xcode 9.3 Build version 9E145
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
react: 16.3.0-alpha.1 => 16.3.0-alpha.1
react-native: https://github.com/expo/react-native/archive/sdk-26.0.0.tar.gz => 0.54.2
Steps to Reproduce
Expected Behavior
The TextInput's text and placeholder should be the same size when "Large Text" is turned on and when it is turned off.
Actual Behavior
The TextInput's text and placeholder is larger when "Large Text" is turned on, despite allowFontScaling=false.
Reproducible Demo
I have created a Snack demonstrating the issue here: https://snack.expo.io/@llamaluvr/android-textinput-allowfontscaling-not-respected
NOTE: This was originally opened and closed under (#13944). Opening a new issue with a demo and more detailed information.
The text was updated successfully, but these errors were encountered: