You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TextInput: at large text sizes a long label is cut off with no ellipsis, and a text size change isn't applied until a reload #5294
At the largest text size (iOS accessibility sizes, Android font scale 2.0), a label that doesn't fit is cut off at the field's end with no ellipsis, both at rest and floated, and the resting label sits against the bottom indicator.
TextInput reads the font scale once, when its module loads (fontScale = PixelRatio.getFontScale() in src/components/TextInput/constants.ts), and sizes the field from it. If the user changes the text size while the app is running, the text grows but the field keeps its old height: on Android at 2.0 the floated label is drawn over the placeholder, and the outlined label's background cuts a gap into the bottom outline. After a JavaScript reload the field is sized correctly.
6.0.0-alpha.3 does the same. The second one has been there since the 6.x TextInput (#4909).
Expected behaviour
A label that doesn't fit ends with an ellipsis and keeps its spacing from the indicator.
A text size change while the app runs resizes the field, as a cold start at the same size does.
How to reproduce?
Render <TextInput label="Confirm password" secureTextEntry value={value} onChangeText={setValue} /> at full width on a phone.
Set the largest text size (iOS: xcrun simctl ui <device> content_size accessibility-extra-extra-extra-large; Android: adb shell settings put system font_scale 2.0) and look at the label at rest and focused.
For the second problem: open the screen at the default size, then set the Android font scale to 2.0 while the app runs, and look at a labelled field at rest and focused. Reload the JavaScript and compare.
Related: #4537 (5.x, an outlined floating label cut off).
Activity
fix(text-input): ellipsize long labels and follow runtime text size