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

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

Closed
dylanrandle opened this issue Apr 2, 2022 · 10 comments

Comments

@dylanrandle
Copy link

Current behaviour

On iOS, if multiline is true and label and placeholder both have a value, the placeholder is not displayed when you click on the input field. If you type something in, selected it all, and delete it, then the placeholder is displayed and works as expected. 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.

image

Expected behaviour

The placeholder should show up.

Code sample

<TextInput
    label="Label"
    placeholder="Placeholder"
    multiline
 />

Screenshots (if applicable)

image

What have you tried

This is still happening even though #1483 was closed.

Your Environment

software version
ios or android ios
react-native 0.64.3
react-native-paper 4.11.1
node 16
npm or yarn yarn
expo sdk 44.0
@github-actions
Copy link

github-actions bot commented Apr 2, 2022

Hey! Thanks for opening the issue. The issue doesn't seem to contain a link to a repro (a snack.expo.dev link or link to a GitHub repo under your username).

Can you provide a minimal repro which demonstrates the issue? A repro will help us debug the issue faster. Please try to keep the repro as small as possible and make sure that we can run it without additional setup.

@github-actions
Copy link

github-actions bot commented Apr 2, 2022

Couldn't find version numbers for the following packages in the issue:

  • react-native-vector-icons
  • npm
  • yarn
  • expo

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

The versions mentioned in the issue for the following packages differ from the latest versions on npm:

  • react-native (found: 0.64.3, latest: 0.68.0)
  • react-native-paper (found: 4.11.1, latest: 4.12.0)

Can you verify that the issue still exists after upgrading to the latest versions of these packages?

@github-actions
Copy link

github-actions bot commented May 3, 2022

Hello 👋, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or 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 it.

@github-actions github-actions bot added the Stale label May 3, 2022
@alexpchin
Copy link

Any update on this issue? Thanks

@mehdinourollah
Copy link

"react-native-paper": "^4.12.3"
It's still open ...and for the love of god someone answer this issue without closing it automatically !

@raajnadar
Copy link
Collaborator

To keep the issue open a repro is required or else the bot will close it!!

If you still have the issue create a new one with a repro!!

@lukewalczak lukewalczak self-assigned this Aug 18, 2022
@lukewalczak
Copy link
Member

I will do my best to investigate that issue.

@lukewalczak
Copy link
Member

The first investigation attempt presented that I was able to reproduce the problem on the fresh TextInput coming from react-native. Please check the following snack with simplified code, based on the input code from the library.
It looks like there is an issue related to setting placeholder value coming from props in correlation with multiline prop, no matter if wrapped in timeout.

@lukewalczak
Copy link
Member

Created a workaround: #3331

@icgarlin
Copy link

Created a workaround: #3331

Workaround doesn't work at all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants