RobinHerbots / Inputmask

Input Mask plugin
https://robinherbots.github.io/Inputmask/
MIT License
6.39k stars 2.17k forks source link

Extra characters added on Android after each key input #1752

Open bravik opened 6 years ago

bravik commented 6 years ago

Jquery v2.2.4 inputmask v 3.3.11 Android 5.1 Chrome 62

    $("#phone").inputmask({
        mask : '+7 (999) 999-99-99',
        clearmaskonlostfocus : false,
        removeMaskOnSubmit : true,
        autoUnmask : true
    });

<input type="tel">

Should look this way +7 (___) ___-__-__ and accept only digits.

Works fine on desktop browser, but on mobile (chrome on Android for example) every time I input a digit it adds extra 7 to it..

Pressing key 1:
+7 (71_) ___-__-__

Pressing key 2:
+7 (771) 2__-__-__

Pressing key 3
+7 (777) 123-__-__
e.t.c

It works only if I do not prepend mask with anything - like this: (999) 999-99-99

By the way, what if I want to prepend a mask with a 9 digit? which is special

RobinHerbots commented 6 years ago

@bravik,

Does this also happen with version 4.x ? I tested your mask with inputmask 4.x on browserstack and don't see the problem

On which device are you testing and which keyboard?