-
Notifications
You must be signed in to change notification settings - Fork 24.2k
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
Bug: TextInput with multiline and lineHeight has height issue when controlled #46207
Labels
Component: TextInput
Related to the TextInput component.
Issue: Author Provided Repro
This issue can be reproduced in Snack or an attached project.
Newer Patch Available
Comments
|
react-native-bot
added
the
Component: TextInput
Related to the TextInput component.
label
Aug 25, 2024
|
This issue only occurs in the iOS simulator and does not occur when running on an actual device. |
cortinico
added
Issue: Author Provided Repro
This issue can be reproduced in Snack or an attached project.
and removed
Needs: Triage 🔍
labels
Aug 28, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Component: TextInput
Related to the TextInput component.
Issue: Author Provided Repro
This issue can be reproduced in Snack or an attached project.
Newer Patch Available
Description
I'm experiencing a bug with the TextInput component when using it as a controlled component with both multiline and lineHeight properties. This issue occurs only on iOS; it does not occur on Android.
Expected Behavior:
The TextInput should adjust its height according to the content without any unexpected changes.
Actual Behavior:
On iOS, when the TextInput is controlled, the height of the TextInput increases unexpectedly as the number of lines increases.
This issue does not occur when the TextInput is uncontrolled.
Steps to reproduce
React Native Version
0.75.2
I have confirmed that this issue does not occur in version 0.73.2.
Affected Platforms
Runtime - iOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://snack.expo.dev/@holyunwoo/eager-indigo-cereal?platform=ios
Screenshots and Videos
Uncontrolled
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-08-25.at.18.18.07.mp4
Controlled
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-08-25.at.18.18.27.mp4
The text was updated successfully, but these errors were encountered: