JsDaddy / ngx-mask

Angular Plugin to make masks on form fields and html elements.
https://jsdaddy.github.io/ngx-mask
MIT License
1.16k stars 300 forks source link

French thousand separator(nbsp, non-breakable space): can't type numbers in the input if bigger than 1 group #1229

Closed herickwilke closed 1 year ago

herickwilke commented 1 year ago

🐞 bug report

Description

Hi, I can't type numbers in the input field if the thousand separator is the French non breaking separator (U+202f nor \u00A0) if the number is bigger than one thousand. E.g 5 855

I can type numbers until the mask inserts the first thousand separator. Than I just can't type more.

🔬 Minimal Reproduction

Stack blitz with the issue example: https://stackblitz.com/edit/stackblitz-starters-7k8fyk?file=src%2Fapp%2Fapp.module.ts

🔥 Exception or Error

No exception prompts.

🌍 Your Environment

Angular Version: @angular/core": "^16.1.6 "ngx-mask": "^16.2.5"

andriikamaldinov1 commented 1 year ago

@herickwilke Thanks for using Ngx-mask. <input type="text" mask="separator.0" [thousandSeparator]="' '" [decimalMarker]="','" />

It example all work as expected - https://stackblitz.com/edit/stackblitz-starters-f3zxro?file=src%2Fapp%2Fnumber-input%2Fnumber-input.component.html