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

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

Open
ChasBoucher opened this issue Sep 22, 2022 · 0 comments

Comments

@ChasBoucher
Copy link

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..

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

No branches or pull requests

1 participant