Files
react-native/packages/react-native
g4rb4g3 79e8474b14 fix: int cast can cause endless loop if value < 1 (#38016)
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

Pull Request resolved: https://github.com/facebook/react-native/pull/38016

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. 🙂

Reviewed By: cipolleschi

Differential Revision: D46931439

Pulled By: NickGerleman

fbshipit-source-id: 6985443b3424539b40bc0081fe742ab59105a2ae
2023-06-22 17:19:40 -07:00
..
2023-06-20 08:00:05 -07:00
…
…