uNmAnNeR / imaskjs

vanilla javascript input mask
https://imask.js.org
MIT License
4.96k stars 258 forks source link

Secure text with last character visible #1036

Closed dicash closed 6 months ago

dicash commented 6 months ago

What problem you are trying to solve? At the moment we have displayChar, allowing to hide characters that are not supposed to be visible.

IMask(element, {
  mask: '000000',
  displayChar: '•',
  lazy: false,
  overwrite: 'shift',
})

New requirement that we have is displaying last input character as visible, like it does iOS.

Describe the solution you'd like Some option to display last character, or maybe allow passing displayChar a function, so that we can decide which char should be visible which shouldn't.

Describe alternatives you've considered Are there alternatives?