vuejs-tips/vue-the-mask

How to keep mask while user is typing

AlexandreLocas opened this issue · 2 comments

Hi, is there a way to keep mask displayed while user is typing ?

Thank you

You can make a wrapper div and set your input with transparent background and absolute position

<div  style="position: relative">
   <p>###.###.###</p>
  <input type="tel" v-mask="'###.###.###'" style="background: transparent; position: absolute; top: 0; left: 0;" />
</div>

Didn't test it but should work just fine

It would be great to have somethink like that https://imask.js.org/guide.html#overwrite