react-native
react-native copied to clipboard
TextInput placeholder is always multiline on Android
Description
On Android, the <TextInput>
's placeholder
property always renders to multiple lines, whereas on iOS it trails the ending (like ellipsizeMode="trail"
).
React Native version:
info Fetching system and libraries information...
System:
OS: macOS 10.15.6
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Memory: 5.61 GB / 32.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 14.8.0 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.7 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.9.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.6, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
Android SDK:
API Levels: 25, 28, 29
Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.0, 30.0.0, 30.0.0, 30.0.1
System Images: android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom
Android NDK: 21.2.6472646
IDEs:
Android Studio: 4.0 AI-193.6911.18.40.6626763
Xcode: 11.6/11E708 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_265 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.2 => 0.63.2
npmGlobalPackages:
*react-native*: Not Found
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
- Create
<TextInput>
component - Set
placeholder
to anything long
Expected Results
The placeholder should leave dots at the trail, so no line wraps.
Snack, code example, screenshot, or link to a repository:
<TextInput
style={textInputStyle}
placeholder={"This is a test placeholder which doesn't ellipzise with trailing dots"}
placeholderTextColor="gray"
value=""
/>
Is there any progress? I met the same problem.
I am also still seeing this issue on 0.63.4
I created a PR for this here: https://github.com/facebook/react-native/pull/29664
Is there any progress? I met the same problem.
Still the problem here...
Current workaround I can found for now is add maxHeight: <fontsize + padding>
to style prop.
I got similar problem, up vote for a new prop ellipsizeMode
Same issue here
Still the problem here too...
same issue here
same issue here
any solution or workaround this? facing same issue
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
Is the issue resolved yet?
I am also facing same issue. Any solution?? Waiting for this issue to be fix. @mrousavy Any update on your PR??
this issue is still there in 10/10/2023 !
same issue here
Same issue here, especially when changing the device font size
This is still happening on RN 0.73.4