-
Notifications
You must be signed in to change notification settings - Fork 305
Description
🐞 bug report
Is this a regression?
No
Description
If I use a mask with only number 99999999999999 and I paste a number with space in it, example :
123 456 789 123 45, the field will only contain 123, everything after the first space is lost.
But if you use the mask 00000000000000 and you copy paste the same text, every number is included, the spaces are just removed.
Is it intended ?
The problem origin seem to be in the ngx-mask-applier.service.ts:728. This make the processing stay at the first space.
For example with 123 456 789 123 45, it will handle the 1, 2,3 then when it the turn, it will stay on the array 4th element until the end.
🔬 Minimal Reproduction
You can create two inputs and then try to copy and paste 123 456 789 123 45
<input type='text' mask="00000000000000">
<input type='text' mask="99999999999999" >
Here is a stackblitz:
https://stackblitz.com/edit/stackblitz-starters-9mr8nqnz?file=src%2Fapp.component.ts
🌍 Your Environment
Angular Version: 18 on my project, and 20 on the stackblitz
@angular-devkit/architect 0.1802.14
@angular-devkit/build-angular 18.2.14
@angular-devkit/core 18.2.14
@angular-devkit/schematics 18.2.14
@angular/cdk 18.2.14
@angular/cli 18.2.14
@angular/ssr 18.2.14
@schematics/angular 18.2.14
rxjs 7.8.1
typescript 5.4.5
zone.js 0.14.10