primevue
primevue copied to clipboard
InputNumber: InputMode wrong calculated
Describe the bug
If you define minFractionDigits=0 and maxFractionDigits=2 then results an inputMode="numeric". But correct is inputMode="decimal".
This is because the "...!minFractionDigits ? 'numeric' : 'decimal' "
I would suggest "...!maxFractionDigits ? 'numeric' : 'decimal' "
This is at least a problem on Iphones, because it opens a keyboard with only numbers
Reproducer
https://stackblitz.com/edit/primevue-3-vite-issue-template-zyl468?file=src%2FApp.vue
PrimeVue version
3.53.0
Vue version
3.x
Language
ALL
Build / Runtime
Vite
Browser(s)
IOS on IPhone
Steps to reproduce the behavior
- Define an InputNumber with minFractionDigits=0 and maxFractionDigits=2 and mode="decimal"
- The created inputMode in the HTML is numeric
Expected behavior
The created inputMode in the HTML should be "decimal"