-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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: int cast can cause endless loop if value < 1 #38016
Conversation
Hi @g4rb4g3! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
...act-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.java
Outdated
Show resolved
Hide resolved
…react/views/text/ReactTextShadowNode.java Co-authored-by: Nick Gerleman <nick@nickgerleman.com>
@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Base commit: 0e41ad0 |
This pull request was successfully merged by @g4rb4g3 in 79e8474. When will my fix make it into a release? | Upcoming Releases |
Great that it is merged already 🎉 Any idea when it will be released? |
Summary:
I faced an issue that on Android the whole UI would freeze when using minimumFontScale. This is caused by an int cast that turns the while loop into an endless loop.
Also the docs are not correct since they say it is an iOS only prop.
https://reactnative.dev/docs/text#minimumfontscale-ios
Changelog:
[ANDROID] [FIXED] - UI freezing when using minimumFontScale
Test Plan:
Run this sample app with and without this fix. https://github.com/g4rb4g3/androidMinimumFontScaleBug
Without the ui will freeze when hitting the + button, with the fix a Text component will be shown and no freeze will happen. 🙂