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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mask with or (||) does not work. #1356

Open
patrik-upspot opened this issue Apr 18, 2024 · 0 comments
Open

Mask with or (||) does not work. #1356

patrik-upspot opened this issue Apr 18, 2024 · 0 comments

Comments

@patrik-upspot
Copy link

patrik-upspot commented Apr 18, 2024

馃悶 bug report

Is this a regression?

I'm not sure, but i think in version 14 will it work like a charm

Description

I have a masking for initials. The initials should be separated by a dot and can contain one to 5 letters. The problem comes with an update of ng-mask. in a earlier version i didnt have problems with this mask. now the "or" (||) masks will not be evaluated. actually i use "ngx-mask": "~15.2.3" with Angular 15.

With Version "ngx-mask": "~15.0.2" the Mask will work perfectly, but if i backspace, i have to set the cursor before the Character. In Version 15.2.3 the mask does not fit, but the backspace works without problems. and i version 14 both works without problems.

馃敩 Minimal Reproduction

    <input
      mask="S.||S.S.||S.S.S.||S.S.S.S.||S.S.S.S.S."
      type="text"
      [dropSpecialCharacters]="false"
      [validation]="false">

https://stackblitz.com/edit/angular-ivy-5agzc8?file=src%2Fapp%2Fapp.component.ts
Version 14 will work

馃敟 Exception or Error


I does not get an Exception or Error. It's not possible to put more than one character. If i change the past to:
"S.S.S.S.S." the last dot appears only if i put five characters into the field.

馃實 Your Environment

Angular Version:


Angular CLI: 15.2.10
Node: 16.20.2
Package Manager: npm 8.19.4
OS: win32 x64

Angular: 15.2.10
... animations, cli, common, compiler, compiler-cli, core
... elements, forms, platform-browser, platform-browser-dynamic
... platform-server, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1502.10
@angular-devkit/build-angular   15.2.10
@angular-devkit/core            15.2.10
@angular-devkit/schematics      15.2.10
@angular/cdk                    15.2.9
@angular/material               15.2.9
@nguniversal/builders           15.2.1
@nguniversal/express-engine     15.1.0
@schematics/angular             15.2.10
rxjs                            7.5.7
typescript                      4.8.4

"ngx-mask": "~15.2.3",

Anything else relevant?

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

2 participants