md-input (type=number) possible bug: Restore Placeholder on empty value
See original GitHub issueBug, feature request, or proposal:
Bug (maybe)
What is the expected behavior?
If I user an md-input with type number and delete the input value, the placeholder should go back to it’s initial place (= Inside Input box) , like placeholder get’s restored in a plain html input box.
What is the current behavior?
Upon erasing the field, console prints
"The specified value "NaN" is not a valid number. The value must match to the following regular expression: -?(\d+|\d+\.\d+|\.\d+)([eE][-+]?\d+)?"
The field is empty, but the placeholder remains ontop of the box.
What are the steps to reproduce?
See Plunker
Which versions of Angular, Material, OS, browsers are affected?
Current Angular rc5 / Material alpha.7
Is there anything else we should know?
Yes, I like your work 😃 Thank you very much.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:8 (2 by maintainers)
Top Results From Across the Web
md-input (type=number) possible bug: Restore Placeholder ...
The problem seems to be an "" (empty string) when a contained value is deleted. This also affects form validation as a required...
Read more >Input number in Angular Material Design? - Stack Overflow
In short, yes. You want < md-input-container > wrapper which supports the following input types. date; datetime-local; email; month; number ...
Read more >Input label does not move up when value or placeholder is sp
I am trying to use mdbootstrap in my meteor app but am running into issues with forms: the label does not move above...
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 >Input & Textarea - Vue Material - Creative Tim
Text fields allow users to input, edit and select text typically inside forms. But they can appear in other places as well like...
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
fixed for
md-input-container
which will replacemd-input
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.