Skip to content
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

Inconsistent text wrap / multiline placeholder behavior in TextInput between iOS and Android #31170

Closed
maxdeepfield opened this issue Mar 16, 2021 · 3 comments
Labels
Component: TextInput Related to the TextInput component. Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.

Comments

@maxdeepfield
Copy link

maxdeepfield commented Mar 16, 2021

Description

If change placeholder of TextInput in iOS it remains in single-line not wrapped.
If change placeholder of TextInput in Android it becomes multi-line wrapped.

React Native version:

0.64.0

Steps To Reproduce

  1. make TextInput with fixed width and text long enough to hide its ending
  2. change placeholder of TextInput

Expected Results

Text of placeholder should be updated in TextInput without changing its line count or wrap property.

Actual (bug) results

Text of placeholder updated in Android but it becomes multi-line and wrapped.

Snack, code example, screenshot, or link to a repository:

Snack: https://snack.expo.io/@maxdeepfield/multiline-placeholder-problem

Before change placeholder of TextInput
image

After change placeholder of TextInput
image

Notes

VERY related to #14845

@rectified95 rectified95 added the Component: TextInput Related to the TextInput component. label Mar 16, 2021
@chrisglein
Copy link

Duplicate of #30666?

@chrisglein
Copy link

Main difference is that you're not explicitly setting the number of lines, but other than that I think it looks likely to be the same core issue. Going to close this as a dupe of the other, feel free to add more commentary in that one. The guess from that thread is that updating the Android Studio version will address this.

@chrisglein chrisglein added Platform: Android Android applications. and removed Needs: Triage 🔍 labels Mar 16, 2021
@maxdeepfield maxdeepfield changed the title Inconsistent text wrap / multiline behavior in TextInput between iOS and Android Inconsistent text wrap / multiline placeholder behavior in TextInput between iOS and Android Mar 16, 2021
@maxdeepfield
Copy link
Author

Its very similar if under hood there happens placeholder update after setting TextInput's value to empty string.

@facebook facebook locked as resolved and limited conversation to collaborators Mar 16, 2022
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: TextInput Related to the TextInput component. Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants