InputNumber: insert behavior defects #4539
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
The InputNumber component when combined with a suffix doesn't handle the input correctly when typing after a leading
0
.As seen in the video below, I am typing the following sequences:
123456
- First attempt, all works good0123456
- Second attempt, the input gets deleted after I type2
.Screencast from 2023-10-03 04:57:35 PM.webm
This happens with any number combinations after typing the second digit after the leading
0
.The bug happens with all scenarios when you type after 0, it doesn't matter if done in one streak or if you blur and focus the element again. If you put the cursor before the
0
the input is entered correctly, but if you start typing after a leading0
, the input gets nullified after the second number hit. Also happens if you type00000000000....
into the input, every second0
typed the input will be turned null. Possible related to #3964Earliest version this was introduced is
3.30.0
and it is still there in the newest version.Reproducer
https://primevue.org/inputnumber/#prefixsuffix
PrimeVue version
3.30.0
Vue version
3.x
Language
TypeScript
Build / Runtime
Vue CLI App
Browser(s)
Firefox 118.0.1 (64-bit) on Ubuntu
Steps to reproduce the behavior
Expiry
012345
345
instead of what you typedExpected behavior
On step 4 from above, the input should have the value
12345
The text was updated successfully, but these errors were encountered: