primevue icon indicating copy to clipboard operation
primevue copied to clipboard

InputNumber: InputMode wrong calculated

Open stephanestermann opened this issue 4 months ago • 1 comments

Describe the bug

image 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' " image

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

  1. Define an InputNumber with minFractionDigits=0 and maxFractionDigits=2 and mode="decimal"
  2. The created inputMode in the HTML is numeric

Expected behavior

The created inputMode in the HTML should be "decimal"

stephanestermann avatar Oct 23 '24 09:10 stephanestermann