v-mask icon indicating copy to clipboard operation
v-mask copied to clipboard

Editing v-text-field with phone number mask (NNN) NNN-NNNN causes cursor to move to end of field

Open ChasBoucher opened this issue 3 years ago • 0 comments

V-Mask and Vue versions

2.3.0

Reproduction Link

https://codesandbox.io/s/m3q1m5yp9x

Steps to reproduce

  1. Enter a phone number in the phone number field with mask '(###) ###-#### image

  2. Highlight three characters in area code part of phone number. image

  3. Change highlighted text eg. enter 123

  4. First two characters are replaced, but cursor moves to the end of the field and last character does not get entered. image

This seems to happen when there is a special character in the mask. eg. ()-. I found that this also happenened on

What is Expected?

When you highlight any number of characters(numbers) and you begin typing, the numbers(characters) should be deleted and the new values should replace the old values...

What is actually happening?

First two characters get changed and cursor move to the end of field and last character does not get entered..

ChasBoucher avatar Sep 22 '22 15:09 ChasBoucher