ngx-mask icon indicating copy to clipboard operation
ngx-mask copied to clipboard

How to prevent user from add a new decimal marker when it already exists?

Open herickwilke opened this issue 2 years ago • 0 comments

🐞 bug report

Description

Let's say I have the number 15.000,53 in my input (thousand separator as dot, comma as decimal), and I put a new comma between 1 and 5, the number gonna change completely. The input will read it as 1,5 and delete numbers. Please watch the following video:

🔬 Minimal Reproduction

https://stackblitz.com/edit/stackblitz-starters-gqxumq?file=src%2Fapp%2Fnumber-input%2Fnumber-input.component.html

https://github.com/JsDaddy/ngx-mask/assets/47700306/c0a37889-2438-4751-912a-9852deebfda6

🌍 Your Environment

Browser: Google Chrome Ngx-mask version: 16.3.4 Angular version: 16.2.4

Thanks.

herickwilke avatar Oct 03 '23 18:10 herickwilke