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

Phone mask backspace leaves opening parenthesis and considers the input valid #692

Closed
jasonhjohnson opened this issue Mar 3, 2020 · 4 comments

Comments

@jasonhjohnson
Copy link

Hi,

I have the following:

<input class="form-control" id="phone" type="text" formControlName="phone" mask="(000) 000-0000" />

When I type in a valid value and then backspace up to the opening parenthesis "(" it considers the input valid. The underlying form control value is empty but the input itself shows the opening parenthesis. Is this an issue or by design?

Thanks,
Jason

@plaramee1
Copy link

I have the same issue, any news on that ?

@jasonhjohnson
Copy link
Author

@plaramee1 Hey, no I don't think I ever truly resolved it. I think I ended up using a different library/solution/workaround. It was only 21 days ago you'd think I'd remember :-)

NepipenkoIgor pushed a commit that referenced this issue Nov 25, 2020
NepipenkoIgor added a commit that referenced this issue Nov 25, 2020
* fix: now backspace no leaves special characters [ref:#692]

* fix: add tests [ref:#692]

Co-authored-by: Igor Nepipenko <[email protected]>
@NepipenkoIgor
Copy link
Collaborator

@jasonhjohnson @plaramee1 Hi . Thank you for using ngx-mask. Please try version v11.1.3
https://stackblitz.com/edit/angular-ivy-mask-trtyt7?file=src%2Fapp%2Fapp.component.html

@Sutil
Copy link

Sutil commented Aug 3, 2022

The problem persists when using multiple masks.
Using this example on stackblitz and changing the mask to 000-00-00||(000) 000-00-00.

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

4 participants