RobinHerbots / Inputmask

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

Phone input mask duplicates each character on Samsung Android tablet #834

Closed Xenovore closed 8 years ago

Xenovore commented 9 years ago

Similar to #705. With this input mask:

$( "#checkout-addr-phone" ).inputmask( "(999) 999-9999" );

. . . every digit entered is duplicated. E.g. if I enter "608555..." I get "(660)088555555". This is with the newest version of inputmask.

RobinHerbots commented 9 years ago

@Xenovore ,

There are still problems in android. In milestone 3.3 I will try to find a fix for android if possible. See issue #465

xenaio-daniil commented 9 years ago

@RobinHerbots , I think this is because of T9, no? At least after switch off this function everything works fine.

RobinHerbots commented 9 years ago

@dekdegiv ,

Yes exactly. If I could disable or handle the suggestions (compositions ) properly, all will work fine.

All info about is welcome.

xenaio-daniil commented 9 years ago

@RobinHerbots , I think it can't be fixed except by switching off, because T9 work with word, but not with letter and it tries to change the whole word and ruins mask, but mask on its place tries to save itself. I think, you can try to use a fake input for each leter with field reset after each symbol. But it looks like a big crutch.

RobinHerbots commented 9 years ago

@dekdegiv ,

Yes a possible solution would be to just disable the mask when used on android. Maybe playing with the input type can solve some things (input type=tel)

Xenovore commented 9 years ago

We tried version 3.1.40 and the character duplication issue is gone there.

RobinHerbots commented 9 years ago

@Xenovore ,

Can you retry with the latest prerelease version 3.1.62-7. ALso setting type: tel on the input element makes it a lot more reliable.

Xenovore commented 9 years ago

Ok, thanks. We're rather busy with other issues now, but when we get a chance we'll revisit it.

On 3/2/2015 6:29 AM, Robin Herbots wrote:

@Xenovore https://github.com/Xenovore ,

Can you retry with the latest prerelease version 3.1.62-7. ALso setting type: tel on the input element makes it a lot more reliable.

— Reply to this email directly or view it on GitHub https://github.com/RobinHerbots/jquery.inputmask/issues/834#issuecomment-76711201.

armyofda12mnkeys commented 9 years ago

just wanted to mention, turning off Predictive text on the Samsung S4 helped another jquery mask plugin. and changing the keyboard to Swype also would fix this issue with that plugin.

I was hoping there was a way to disable predictive text via html attributes so wouldnt require user input (like adding autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"), but that didn't work :(.

EDIT: i was going to suggest disabling on android, but having the input type set to "tel" just like suggested as above fixes the issue on S4. I guess the phone's numpad turns off Predictive Text even though the setting is on.

JoeyHoutenbos commented 9 years ago

Disabling Predictive Text on Galaxy Tab 3 also fixes the problem. Only problem is that I do not want my end-users to say they have to disable it x)

RobinHerbots commented 8 years ago

@Xenovore , @dekdegiv , @armyofda12mnkeys , @JoeyHoutenbos ,

Can someone retest this with the latest version

xenaio-daniil commented 8 years ago

@RobinHerbots, tested demopage on Android 4.3, Chrome, standart keyboard. Duplication is gone, but now every 2 symbols (approximately) keyboard switchs from numeric to alphabetical layout. UPD. tested same thing but with MessageEasy Keybord. No duplicion, no switching

RobinHerbots commented 8 years ago

@dekdegiv ,

Ok, but that is a another issue. See #941

ligadus commented 5 years ago

Hello, @RobinHerbots I have same problem with email.

Do you have some tip? V- 4.0.3 - 2018-11-07

    $(".mascara_email_").inputmask({
      mask: "*{1,20}[.*{1,20}][.*{1,20}][.*{1,20}]@*{1,20}[.*{2,6}][.*{1,2}]",
      greedy: false,
      placeholder: "",

      onBeforePaste: function (pastedValue, opts) {
        pastedValue = pastedValue.toLowerCase();
        return pastedValue.replace("mailto:", "");
      },
      definitions: {
        '*': {
          validator: "[0-9A-Za-z!#$%&'*+/=?^_`{|}~\-]",
          casing: "lower"
        }
      }
    });
knoxcard commented 5 years ago

@ligadus - Try this...

HTML

<input type="password" class="mascara_email_" name="mascara_email" autocomplete="email" />

JS

$('.mascara_email_').inputmask({
   alias: 'email'
})
$('.mascara_email_').attr('type', 'text")

What are the results?