react-native-paper icon indicating copy to clipboard operation
react-native-paper copied to clipboard

TextInput's placeholder is not being displayed initially with multiline set to true on iOS

Open ImTheC opened this issue 7 years ago • 20 comments

Current behaviour

On iOS, when using , if multiline is true and label and placeholder both have a value, the placeholder is not displayed when you click on the input filed. If you type something in, selected it all, and delete it, then the placeholder is displayed and works as expected.

Expected behaviour

The placeholder should be displayed after clicking on the input field.

Code sample

https://snack.expo.io/S1_Ags-nB

Screenshots (if applicable)

N/A

What have you tried

At first I was passing in the values with props, so I tried setting them directly as strings, but it didn't seem to matter either way.

Your Environment

software version
ios or android ios
react-native 0.60.5
react-native-paper 3.1.1
node 11.15.0
npm or yarn npm
expo sdk 35.0.0

ImTheC avatar Nov 19 '19 17:11 ImTheC

@ImTheC Can you check if it still occurs in paper v3.3.0?

Trancever avatar Dec 12 '19 14:12 Trancever

@Trancever This behavior still exists as of v3.5.1, running the TextInput example on Snack, only adding multiline and a placeholder string. Placeholder works as expected without multiline.

koktavy avatar Jan 30 '20 15:01 koktavy

We are experiencing the same issue on iOS. Paper v 3.6.0

If you enter two lines of text into the text input and then erase them, then you will see the placeholder. See the video for an example of this behavior.

RNP_multiline_textinput_placeholder

jeffjvick avatar Feb 25 '20 20:02 jeffjvick

Hello 👋, this issue has been open for more than 2 months with no activity on it. If the issue is still present in the latest version, please leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution on workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix the issue.

github-actions[bot] avatar Apr 26 '20 00:04 github-actions[bot]

Having this same issue. Was anyone able to resolve it? Using 3.8.0, seeing the same behavior as @jeffjvick

ovbm avatar May 28 '20 12:05 ovbm

@ovbm My team has not prioritized finding a workaround, but I can confirm the issue remains. I tested again using the example Snack, running 3.10.1.

koktavy avatar Jun 01 '20 19:06 koktavy

Still present

Biciato avatar Jan 12 '21 14:01 Biciato

We might want to re-open this issues as it still occurs ?

JulienRst avatar Feb 19 '21 10:02 JulienRst

This is still the issue in latest version

enagorny avatar Feb 23 '21 16:02 enagorny

+1

dongdyang avatar Feb 27 '21 02:02 dongdyang

Still having this issue

blixit avatar Mar 14 '21 00:03 blixit

I am having the same issue @kotavy did you find a workaround?

angel-venchev-toptal avatar Mar 22 '21 21:03 angel-venchev-toptal

in IOS build I am facing same issue Placeholder is missing, can some one help me?

HassanHaiderIX avatar Mar 24 '21 07:03 HassanHaiderIX

Is there any way to always show placeholder?

wennaspeedy avatar Mar 31 '21 12:03 wennaspeedy

what I found out that turning off dark mode will resolve this issue.

HassanHaiderIX avatar Mar 31 '21 12:03 HassanHaiderIX

still an issue... not in dark mode

neilgamb avatar Apr 01 '21 12:04 neilgamb

This is still an issue. Please re-open.

dylanrandle avatar Apr 02 '22 22:04 dylanrandle

Created a new issue #3138.

dylanrandle avatar Apr 02 '22 22:04 dylanrandle

"react-native-paper": "^4.12.3" still have this issue on iOS

mehdinourollah avatar Aug 09 '22 07:08 mehdinourollah

add this as a prop to fix the issue <TextInput placeholderTextColor={"grey"}/>

benasdom avatar Oct 23 '22 12:10 benasdom