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

Shifting the existing input instead of rewriting -- possibly need an option #123

Open
wolfflow opened this issue Feb 5, 2018 · 0 comments

Comments

@wolfflow
Copy link

wolfflow commented Feb 5, 2018

Hello !

Demo (video): http://take.ms/iJkM7

A brief description of the expectations below:

  1. I fill in an IBAN. It is being formatted like:
    1234 ABCD EFGH 0123
  2. Then I move the caret to some character in the middle of masked input (let it be right after B symbol ):
    1234 ABCD EFGH 0123
    .......^
  3. Then I press backspace and get
    1234 ACDE FGH0 123
    ......^
  4. After that I try to type B once again and get
    123 ABDE FGH0 123 instead of naively) expected 1234 ABCD EFGH 0123

The settings of the field are following:

{
    mask: '#### #### #### #### #### #### #### #### ##',
    size: 42,
    placeholderChar: ' ',
    placeholderFixed: '#### #### #### #### #### #### #### #### ##',
    hidePlaceholder: true,
    isRevealingMask: true
},

P.S. Doing this without a placeholderFixed and a visible placeholder wont do, as IBAN is a format of arbitrary size, so when I enter something like AD12 0001 2030 2003 5910 0100 and then try to change it to like AT61 1904 3002 3457 3201 (which is also a valid IBAN) I will see AT61 1904 3002 3457 3201 XXXX where X is a placeholder char -- it won't disappear even if I clean all input.

Thanks in advance!

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