Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InputNumber: insert behavior defects #4539

Closed
dimitriadisg opened this issue Oct 3, 2023 · 3 comments · Fixed by #4747
Closed

InputNumber: insert behavior defects #4539

dimitriadisg opened this issue Oct 3, 2023 · 3 comments · Fixed by #4747
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@dimitriadisg
Copy link

dimitriadisg commented Oct 3, 2023

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 good
0123456 - Second attempt, the input gets deleted after I type 2.
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 leading 0, the input gets nullified after the second number hit. Also happens if you type 00000000000.... into the input, every second 0 typed the input will be turned null. Possible related to #3964
Earliest 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

  1. Go to https://primevue.org/inputnumber/#prefixsuffix
  2. Find the input field labeled as Expiry
  3. Delete the content of the input and type 012345
  4. See the input now has value 345 instead of what you typed

Expected behavior

On step 4 from above, the input should have the value 12345

@dimitriadisg dimitriadisg added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 3, 2023
@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 16, 2023
@mertsincan mertsincan added this to the 3.47.0 milestone Jan 16, 2024
@tugcekucukoglu tugcekucukoglu changed the title Component Name: InputNumber InputNumber: insert behavior defects Jan 17, 2024
@dimitriadisg
Copy link
Author

Hey @mertsincan I can still see this bug in 3.52.0, check this:
Screencast from 2024-05-20 04:03:02 PM.webm

@KingKoxy
Copy link

Hey the bug seems to still exist in version 4.2.4 and can also still be reproduced by the steps provided by the original post.

@dimitriadisg
Copy link
Author

dimitriadisg commented Dec 19, 2024

Hi @tugcekucukoglu, What do we do with this as the bug is still present, shall we re-open this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants