-
Notifications
You must be signed in to change notification settings - Fork 382
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
Nuxt UI - UInput Type Number - weird behaviour with decimals #1722
Comments
Hi @KazTheCreator , Seems to be working fine on my side. What device are you using? |
Hi! I use Mac and Brave. |
@KazTheCreator @vvadymk Yeah. Got it will try submit a PR to fix. Think it has to do with the 'looseNumber' function. @benjamincanac any input? Should I just add a check to only convert to number if doesn't start with 0? It seems a bit complex unless we remove this? |
Thank you guys! If you need further information from me - tell me! :) |
@romhml Any insight on this? |
Hey! I dont really know if it helps but anyway. if you enter 0 then :model-value="0" "0," is behaving fine. |
I think I found the culprit: https://github.com/nuxt/ui/blob/dev/src/runtime/components/forms/Input.vue#L194 The
We need to tweak the function to preserve the |
I am facing a similar problem. I am creating a way for sales transactions to be received. I am using a Mac and safari. |
Description
Hey!
Im using an UInput type number and encountered something strange.
It is not possible to write the number "1.04" or "0.06". The culprit seems to be the "0" after the ".".
Further example of working decimal: "1.14", 1.56"
It works fine if you use "," as a comma but my mobile phones number keyboard only provides ".".
The same behvaiour can be tested here:
https://ui.nuxt.com/components/input
Im using Mac and Chrome to test.
Let me know what you think! :)
The text was updated successfully, but these errors were encountered: