In chrome, when we use `<input type='number'`>, if we type any non numeric characters, they are not displayed.

In mozilla, they are displayed. However, when I get `e.target.value`, I am getting an empty string with a validation message `Please enter an number`.

I want the chrome functionality in mozilla - I am trying to strip out the last character if it is not numeric - but as the value is empty string as soon as non numeric character is entered I am unable to do so.