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

[Feature Request] show placeholder only on focus for text fields #12499

Closed
WilliamColmenares opened this issue Oct 24, 2020 · 2 comments
Closed
Assignees
Labels
C: VTextField T: enhancement Functionality that enhances existing features
Milestone

Comments

@WilliamColmenares
Copy link

Problem to solve

when setting both placeholder and label to a v-text-field, both are shown in the beginning and the label is stuck in the top.

To achieve the default behavior shown in most sites (show the placeholder only when is focused if there is a label) you would need to make use of data and custom methods to handle those change

Proposed solution

add a persistent-placeholder prop set to true on default so we can set it to false to achieve a more user-friendly behavior.

@jacekkarczmarczyk jacekkarczmarczyk added C: VTextField T: enhancement Functionality that enhances existing features labels Oct 24, 2020
@johnleider johnleider added this to the v2.4.0 milestone Oct 27, 2020
@johnleider johnleider self-assigned this Oct 27, 2020
@KaelWD
Copy link
Member

KaelWD commented Nov 17, 2020

Pretty easy to implement:
Peek 2020-11-18 01-41
I don't like the idea of adding more props though, I'd be more inclined to make this the default behaviour at risk of maybe breaking forms expecting both to be shown. The current behaviour can be confusing as the placeholder looks very similar to typed text, so that should be discouraged anyway.

KaelWD added a commit that referenced this issue Nov 17, 2020
resolves #12499

Having both label and placeholder displayed can be a usability problem
as the placeholder looks very similar to typed text and could be
confused with user input at a glance
@KaelWD KaelWD assigned KaelWD and unassigned johnleider Nov 17, 2020
KaelWD added a commit that referenced this issue Nov 17, 2020
)

resolves #12499

Having both label and placeholder displayed can be a usability problem
as the placeholder looks very similar to typed text and could be
confused with user input at a glance
@KaelWD KaelWD closed this as completed Nov 17, 2020
@zetaraku
Copy link

zetaraku commented Jan 9, 2021

Please take a look at #12839, this change now breaks my forms that expect both to be shown. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VTextField T: enhancement Functionality that enhances existing features
Projects
None yet
Development

No branches or pull requests

5 participants