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

Select All (e.g. Ctrl+A) then a Number is 0.X instead of 0.0X (sometimes) #96

Open
cameronleger opened this issue May 28, 2020 · 3 comments

Comments

@cameronleger
Copy link

  1. https://nbfontana.github.io/ngx-currency/
  2. 0.00 is the default
  3. Select-All inside the input
  4. Key-in a Number, like 5
  5. The value is now 0.5 (whereas 0.05 is expected)
  6. Key-in more Numbers, like 4321
  7. The value is now 543.21
  8. Select-All inside the Input
  9. Key-in a Number, like 5
  10. The value is now 0.05 (as expected!)

So, it seems that if the value is currently 0, there is some unexpected behavior when the entire value is modified to something else. It's especially interesting if you try the Number 0, which results in a 0.0 and not 0.00.

ngccurrency-bug

@hamonCordova
Copy link

Same problem here. I'm working with precision 8

@cameronleger
Copy link
Author

Well there's not a lot of chatter about it, but I will probably start working on this soon if I have more time.

@a-kardas
Copy link

a-kardas commented Jan 11, 2021

Hi,

Thank you for all the work you put into the development of the project. I observe something similar to the reported issue.

Steps to reproduce:

  1. Go to the demo app - https://nbfontana.github.io/ngx-currency/
  2. Enter a value, for example, 12345
  3. Remove the value
  4. Paste a value, for example, 12.345.678.901,23
  5. Component value is now 12345678.9 (12.345.678.901,23 is expected)

ezgif com-video-to-gif (1)

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

No branches or pull requests

4 participants