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

Cursor jumps to the end of the line in input with two masks and a prefix #1458

Open
dmiap1 opened this issue Nov 14, 2024 · 0 comments
Open

Comments

@dmiap1
Copy link

dmiap1 commented Nov 14, 2024

🐞 bug report

Is this a regression?

Not sure

Description

Please consider a following input containing two masks and a prefix. Bug manifests when a long line for mask 2 is entered. When trying to delete characters with Backspace or to enter a character in the middle of the string the cursor jumps to the end of the line.

<input class="form-control" id="id-buggy-input" maxlength="40" name="buggy-input"
                        type="text" mask="00) 000-00-00||00) 000-00-00; 0 (000) 000-00-00"
                        prefix="8 (0"
                        [showMaskTyped]="true"
                        [specialCharacters]="[ '(' ,')' , '-', ';', '.', ' ' ]"
                        [dropSpecialCharacters]="false"
                        />

🔬 Minimal Reproduction

stackblitz

  1. Enter a line 8 (011) 111-11-11; 1 (111) 111-11-11
  2. Place a cursor in the middle of the line
  3. Press Backspace or input a number

Observe that the cursor jumps to the end of the line

🌍 Your Environment

Angular Version:


Angular CLI: 18.2.9
Node: 20.18.0
Package Manager: npm 10.8.2
OS: win32 x64

Angular: 18.2.8
... animations, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1802.9
@angular-devkit/build-angular   18.2.9
@angular-devkit/core            18.2.9
@angular-devkit/schematics      18.2.9
@angular/cli                    18.2.9
@schematics/angular             18.2.9
rxjs                            7.8.1
typescript                      5.5.4
zone.js                         0.14.10

Anything else relevant?

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

No branches or pull requests

1 participant