-
Notifications
You must be signed in to change notification settings - Fork 129
[Bug] [Regression] Text Prompt Incorrectly Uses Placeholder Value as the Default Value #322
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
Comments
i don't understand how you managed to get the value twice. what exactly did you do? did you press tab? return? etc the exact steps you made to get there would be helpful. meanwhile, there was a change to make the placeholder insert when you press enter. i think we probably shouldn't have made that change. @natemoo-re @dreyfus92 i think the right move here is to revert 5dfce8a in 0.x until we can figure out what behaviour we want |
@43081j I pressed Enter/Return like I mentioned in the placeholder. That gave me the value twice. |
i can't seem to reproduce that locally in 0.x with this: const result = await prompts.text({
message: 'hi',
placeholder: 'bleep',
defaultValue: 'bloop'
});
// result is bleep as in, i do get the placeholder and we should fix that. but i can't get it to repeat the value |
@43081j Yes you're right, I wasn't able to reproduce the repetition of the value for version Moving forward, are you guys planning on using the placeholder as the value of |
@43081j Here's how to reproduce the bug: https://stackblitz.com/edit/node-yermlvhc?file=package.json,index.js . Looks like there are two issues here:
|
I have to get agreement from the other maintainers but I'd like to make placeholder a visual thing rather than ever being used as a value Meanwhile I think we will roll back the change in 0.x that caused this either way |
@aliasghar98 can you try out the pkg.pr install in #324 and let me know if it fixes both issues |
@43081j Just tried it out, works perfectly fine. Thanks! |
this has now been released 🎉 let me know if there's any problems, but otherwise closing this now 👍 |
Uh oh!
There was an error while loading. Please reload this page.
Environment
Describe the bug
Upon not entering anything for a text prompt and having a placeholder value defined, the placeholder value replaces the actual text input for that prompt twice duplicated.
To Reproduce
Please refer to the screenshots.
The text was updated successfully, but these errors were encountered: