vue-number-format
vue-number-format copied to clipboard
Empty prefix causes weird behaviour
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)
Thanks for reporting, we just had a very similar faulty outcome which seems to be related.
Reproduction steps:
- Remove prefix (value turns to 1.234,57)
- Change decimals to 0 (value turns to 1.235)
- Focus the input field (just click in it, no change required)
- 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.
@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
Same problem here, can someone provide me with a workaround example?
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.
Use latest version, I have fix the issue.