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

Cursor moves to the last character every time I try to edit the text from middle #421

Open
Nehasoni988 opened this issue Oct 16, 2023 · 0 comments

Comments

@Nehasoni988
Copy link

I am using this library in my Vue 3 project, and I noticed that whenever I try to edit the phone number, the cursor always moves to the last character, making it difficult to edit the text.

Steps to reproduce the problem-

  1. Go to the demo.
  2. Type any phone number inside the text box.
  3. Click on, the "Show Options" link.
  4. Uncheck the "autoFormat" checkbox. (As I don't want auto-formatting)
  5. Now, try to edit the phone number from the middle, you should see the cursor jumping to the last character position.

Here is the same sample code to see the behavior-

<template>
  <vue-tel-input v-model="phone" mode="international"></vue-tel-input>
</template>

<script>
  import { ref } from 'vue';
  import { VueTelInput } from 'vue-tel-input';
  import 'vue-tel-input/vue-tel-input.css';

  export default {
    components: {
      VueTelInput,
    },

    setup() {
      const phone = ref(null);

      return {
        value,
      };
    },
  };
</script>

Environment details-

"vue": "3.3.4",
"vue-tel-input": "8.1.4",
"@types/vue-tel-input": "2.1.3",

Browser details-
On Chrome and Safari, this issue is reproducible.

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

1 participant