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

Input seleciontStart goes to wrong position after dynamic mask changes while typing #1069

Closed
mikaelboff opened this issue Feb 16, 2023 · 2 comments

Comments

@mikaelboff
Copy link
Contributor

🐞 bug report

Is this a regression?

No

Description

Using dynamic mask (mask composed by two masks), when it changes from to smaller mask to the bigger one, the caret position (selectionStart) doesn't go to the end on the input, it stays on the middle of it, on the old position.

🔬 Minimal Reproduction

Editor:
https://stackblitz.com/edit/angular-ivy-mask-dynamic-issue?file=src%2Fapp%2Fapp.component.html

Browser:
https://angular-ivy-mask-dynamic-issue.stackblitz.io/

🔥 Exception or Error

Reproduction

🌍 Your Environment

Angular Version:



     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 12.2.17
Node: 16.19.0 (Unsupported)
Package Manager: npm 8.19.3
OS: linux x64

Angular: 12.2.15
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1202.14
@angular-devkit/build-angular   12.2.14
@angular-devkit/core            12.2.14
@angular-devkit/schematics      12.2.17
@angular/cli                    12.2.17
@schematics/angular             12.2.17
rxjs                            6.6.7
typescript                      4.3.5

Anything else relevant?
ngx-mask version: 15.0.2

@mikaelboff
Copy link
Contributor Author

@NepipenkoIgor Hello, I'm needing these to my enterprise project, best regards!!

@NepipenkoIgor
Copy link
Collaborator

@mikaelboff Merged. And thank you that using ngx-mask and contributing . Ngx-mask 15.0.3 just published

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

2 participants