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

Empty prefix causes weird behaviour #66

Closed
huubbouma opened this issue Jan 30, 2024 · 5 comments
Closed

Empty prefix causes weird behaviour #66

huubbouma opened this issue Jan 30, 2024 · 5 comments

Comments

@huubbouma
Copy link

This can be seen in the playground
https://vue-number-format.netlify.app/guide/play-ground.html

steps to reproduce:

  • Clear the prefix field and leave a dot as the seperator (and comma as decimal)
  • Now start typing: 12345

As soon as you type the 5 a comma appears

After a blur (hit tab) the number changes to: 1,23

(Either fill in a prefix, or change the seperator to something else and everything works fine)

@Niccober
Copy link

Thanks for reporting, we just had a very similar faulty outcome which seems to be related.

Reproduction steps:

  1. Remove prefix (value turns to 1.234,57)
  2. Change decimals to 0 (value turns to 1.235)
  3. Focus the input field (just click in it, no change required)
  4. Blur the input field (value turns to 1)

We could overcome the issue by using a Unicode period instead of the "normal" one but we are nonetheless looking forward to a fix.

@huubbouma
Copy link
Author

huubbouma commented Jan 31, 2024

@Niccober

We could overcome the issue by using a Unicode period instead of the "normal" one but we are nonetheless looking forward to a fix.

Smart thinking :-)
I implemented a similar workaround, by using the unicode character of ​ for the prefix field

@dluccajose
Copy link

Same problem here, can someone provide me with a workaround example?

@huubbouma
Copy link
Author

Same problem here, can someone provide me with a workaround example?

Just fill in a character in the prefix option.
There are Unicode characters which are sort of invisible like the NegativeMediumSpace character. That worked for me.

@dipaksarkar
Copy link
Contributor

Use latest version, I have fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants