Placeholder shown instead of value
See original GitHub issueExpected Behavior
Given you have the following vue-numeric component:
<vue-numeric v-model="value" placeholder="placeholder" />
If value is set, I would expect to see the value. Just as described in the documents:
Input placeholder when empty
Actual Behavior
When component is mounted, the value is not shown until you click on the input field. The placeholder is shown instead.
Steps to Reproduce the Problem
See example in codesandbox: https://codesandbox.io/s/v821j799wl
Specifications
- Plugin Version: 2.3.0
- Vue.js Version: 2.5.2
- Browser: Firefox Dev. 60.0b12
- OS: macOS 10.13.3
In #39 you said it was intended to work like this, can you explain the reason for this?
Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Show placeholder instead of the default value in html form
Yes, with a placeholder, the user can just start typing a new value. However, you are requesting that the placeholder be forced to...
Read more >:placeholder-shown - CSS: Cascading Style Sheets | MDN
The :placeholder-shown CSS pseudo-class represents any or element that is currently displaying placeholder text.
Read more >placeholder-shown - CSS-Tricks
:placeholder-shown is for selecting the input itself when it's placeholder text is being shown. As opposed to ::placeholder which styles the ...
Read more >Placeholder vs Value Attributes in HTML - GeeksforGeeks
The placeholder attribute specifies a short hint that describes the expected value (type of value) of an input field. The value attribute ...
Read more >CSS :placeholder-shown | SamanthaMing.com
The :placeholder-show is a CSS pseudo-class that allows you to apply styling to <input> or <textarea> that has a placeholder text. <input placeholder=" ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you set your value in the
mounted()
event, this works as expectedshould be fixed now https://github.com/kevinongko/vue-numeric/releases/tag/v2.4.1