No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Autofocus input fields with a filled mask to the beginning of the input mask, how?

    Help
    3
    3
    339
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • 9
      9223000 last edited by 9223000

      <q-input v-model=“phone” autofocus mask="+7 (###) ###-##-##" fill-mask />
      inputmask.png
      After showing the field, the default input cursor is set at the end of the input mask and goes to the beginning of the input mask at the beginning of entering the value in the field

      How to make sure that after entering autofocus in the field with the fill-mask, the input cursor is set by default at the beginning of the mask input?
      inputmask1.png

      Code SandBox:
      https://codesandbox.io/s/q-input-autofocus-mask-filled-77ztl?file=/src/pages/Index.vue

      1 Reply Last reply Reply Quote 1
      • P
        PS 0 last edited by

        I’m also facing that issue with the latest version of quasar. Did you found a workaround?
        With autofocus set to the input field, the cursor is going at the end of the input.

        dobbel 1 Reply Last reply Reply Quote 0
        • dobbel
          dobbel @PS 0 last edited by

          @ps-0

          Here’s a thread about setting the cursor:
          https://stackoverflow.com/questions/48868075/javascript-set-cursor-position-when-changing-the-value-of-input

          1 Reply Last reply Reply Quote 0
          • First post
            Last post