Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Replacing phone number area code goes to end after two characters #423

Open
GregFinzer opened this issue Jun 28, 2019 · 8 comments · Fixed by #434
Open

Replacing phone number area code goes to end after two characters #423

GregFinzer opened this issue Jun 28, 2019 · 8 comments · Fixed by #434

Comments

@GregFinzer
Copy link

V-Mask and Vue versions

1.3.1, 2.5

Reproduction Link

https://jsfiddle.net/gfinzer/3uLx0ac2/4/

Steps to reproduce

  1. Type in the phone number (777) 777-7777
  2. Highlight all three digits of the area code
  3. Type in 888

What is Expected?

(888) 777-7777

What is actually happening?

The result is (887) 777-7778

@probil probil mentioned this issue Jul 19, 2019
@clemsontiger
Copy link

clemsontiger commented Aug 22, 2019

I got the latest release (2.02) as of today, but this is still not working correctly for me.
If 2a below, It goes to end after 2 character ,
or 2b below, goes to end after 1 character

Steps to reproduce
1.Type in the phone number (111) 222-3333
2a. Highlight all three digits of the area code
2b. Highlight all three digits of the area code, delete (or backspace)
3.Type in 999

What is Expected?
(999) 222-3333

What is actually happening?
The result is 2a: (992) 223-3339, 2b: (922) 233-339

you can take one of the demo links and change the mask to (XXX) XXX-XXXX and see for yourself as well.

@probil probil reopened this Aug 22, 2019
@clemsontiger
Copy link

Just wanted to add that I appreciate this filter a lot and the fact you've provided it free and keep it up free.

@clemsontiger
Copy link

@GregFinzer or @probil Is there a quick code update I can do in the meantime while waiting for an official fix? I looked at it myself but not seeing what to do.

@clemsontiger
Copy link

any update?

@probil
Copy link
Owner

probil commented Oct 16, 2019

Hi @clemsontiger
Thanks for patience. There is a potential fix in one of other issues. I can send you a link. Give me a second

@probil
Copy link
Owner

probil commented Oct 16, 2019

@clemsontiger #59 (comment)

@clemsontiger
Copy link

Thank you. Though I wouldn't call it so much a fix more like a work around until you get the actual code fixed. But better than nothing I guess.

@clemsontiger
Copy link

clemsontiger commented Feb 18, 2020

@probil, interesting, if I remove the v-model binding, the mask then does not seem to have this issue described in #423 (comment) above. Obviously though I want to use v-model binding, so maybe this detail will help you figure out how to fix? Another plugin, vue-the-mask seems to have same issue.

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

Successfully merging a pull request may close this issue.

3 participants