b-form-input type="number" not allowing to enter decimals(.) on Firefox
See original GitHub issueI have a number field on my form
<b-form-input type="number" v-model.number="param.default" mousewheel.native="$event.preventDefault()"/>
I used to be able to enter decimals like “3.5” or “10.0”, etc… but it stopped working recently. I’ve confirmed that the same issue exists on the bootstrap-vue website - under “Type number:” section (https://bootstrap-vue.js.org/docs/components/form-input/)
Strangely, I can still enter a decimal if I type it elsewhere, and copy / paste into the form field. b-form-input seems to be preventing me from entering “.” character.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Firefox does not allow decimals in input[type=number]
I have a simple input[type=number] field and when I try to type a decimal value in it (e.g. 4.5), the browser puts an...
Read more ><input type="number"> - HTML: HyperText Markup Language
<input> elements of type number are used to let the user enter a number. They include built-in validation to reject non-numerical entries.
Read more >Provide a way to allow <input type=number> to display its ...
This bug is about allowing content authors to specify that they want a fixed number of decimal places to be used when a...
Read more ><input type="range"> - HTML: HyperText Markup Language
elements of type range let the user specify a numeric value which must be ... for range inputs is 1, allowing only integers...
Read more >decimal symbol is a comma for input type=number but OS is ...
It also did this on Windows 7. Other browsers do accept the point symbol.
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
You might need to add attributes to set the step values
See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number#Allowing_decimal_values
Thanks. I’ve added
.number
. Alsostep="any"
.