beholdr / maska

Simple zero-dependency input mask for Alpine.js, Svelte, Vue.js and vanilla JS.

Home Page:https://beholdr.github.io/maska

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong cursor position when typing inside a string bad character

Draftangel opened this issue · comments

...continuing #162

Describe the bug

I also noticed some bug in your demo with mask ####. Cursor has wrong position after typed new symbol which doesn't match the current mask.

Steps to reproduce

  • In your demo page change mask template to ####
  • typed 1234 // 1234|
  • moved cursor after 2 // 12|34
  • typed any letter, s // 123|4
  • cursor might still on dot, after 2 // 12|34
  • profit

Screenshots

image
image

I have same a problem