With input type number I should see characters like 'aaa'
I can type any cahracter
https://plnkr.co/edit/Fn3W5yPofeNFtXZCynpW?p=preview
Type 'aa' for example
Material beta-6
Angular 4.1.3
FireFox 53.0.3
Any character can be typed into the input field in Firefox due to the implementation choice within Firefox. Firefox allows the entry of the non-number characters but notes it as invalid within the form.
You should be able to prevent the input of non-number characters by listening to events on the input. <input type="number" (keypress)="checkIfNumber($event)">
What he said does not work on mobile devices. That is really awful !!
when the type="number" for input, it is enough information to force it to take numeric inputs. And it works perfectly in Chrome. Why do we have to make additional check (checkIfNumber) and do our own validation for firefox? It clearly does not work for firefox and it is a bug and should be registered as a bug and not be closed.
Hello
Any update on this bug
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._
Most helpful comment
when the type="number" for input, it is enough information to force it to take numeric inputs. And it works perfectly in Chrome. Why do we have to make additional check (checkIfNumber) and do our own validation for firefox? It clearly does not work for firefox and it is a bug and should be registered as a bug and not be closed.