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

[Bug Report][3.5.12] [Bug Report][3.5.12] VNumberInput: resets entered with keyboard value on component blur when use step props like a float 0.1 #19494

Closed
rexchungsf opened this issue Mar 28, 2024 · 1 comment · Fixed by #19605
Assignees
Labels
C: VNumberInput T: bug Functionality that does not work as intended/expected
Milestone

Comments

@rexchungsf
Copy link

Environment

Vuetify Version: 3.5.12
Vue Version: 3.4.21
Browsers: Chrome 123.0.0.0
OS: Windows 10

Steps to reproduce

enter number value using keyboard
click outside of component

Expected Behavior

a float value should stay the same like int

Actual Behavior

component resets value

Reproduction Link

https://play.vuetifyjs.com/#...

@yuwu9145 yuwu9145 self-assigned this Mar 29, 2024
@yuwu9145 yuwu9145 added T: bug Functionality that does not work as intended/expected C: VNumberInput and removed S: triage labels Mar 29, 2024
@coderkatze
Copy link

coderkatze commented Apr 17, 2024

I also experience this and another related problem with the VNumberInput, and extended on the reproduction https://play.vuetifyjs.com/#...

There you can see, when using the increment/decrement buttons that the @update:model-value event is - I assume - only fired when the parseInt result of the value changes to a different integer (clicking until 3 is put out in the console, then decrement by 0,1 and it gives a value of 2 again)

This parseInt seems to be the culprit

if (inputRef.value) model.value = parseInt(inputRef.value.value, 10)

coderkatze pushed a commit to coderkatze/vuetify that referenced this issue Apr 20, 2024
@johnleider johnleider added this to the v3.5.x milestone Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VNumberInput T: bug Functionality that does not work as intended/expected
Projects
None yet
4 participants