How to solve the problem with Jquery.inputmask on Android?

There here is such a plugin robinherbots.github.io/Inputmask.
I believe that all well acquainted with him, good it is used everywhere.

On the comp it works quite well, but watch the video which shows what happens when we try to enter a phone number with Android, see:
https://www.youtube.com/watch?v=qH-VVrW30VQ&featur...

Question - what can you do? Maybe there are some alternative plugins that work the same on all devices?
July 2nd 19 at 13:43
6 answers
July 2nd 19 at 13:45
Solution
jsfiddle.net/jNkZM/21
Updated the script from digitalbush. Fixed bug with cursor under Android
Fixed in version 4.x (https://github.com/RobinHerbots/Inputmask/issues/1595) - Gia_Kuhlm commented on July 2nd 19 at 13:48
: Not fixed. Have sitesterol on multiple phones with different browsers. My form started to fail on browser UC Browser, in other browsers everything is OK. someone on all browsers problem. It is not clear what it depends on. But forcing the cursor to the desired position leads to the problem. - teresa64 commented on July 2nd 19 at 13:51
Well, "XS", as they say. Tested on different devices. The script works (actively, since the websites food delivery and online shopping), at least 5 sites. Since upgraded to version 4 problems with the input disappeared. - Gia_Kuhlm commented on July 2nd 19 at 13:54
July 2nd 19 at 13:47
also here's a nudge
so what? it works the same way - Gia_Kuhlm commented on July 2nd 19 at 13:50
Or rather not exactly the same, and even worse - puts the cursor always at the beginning - teresa64 commented on July 2nd 19 at 13:53
: just checked on chrome mobile (Android), everything is OK. - Gia_Kuhlm commented on July 2nd 19 at 13:56
: can video record will show how it works for me. It puts the cursor all the time in the beginning of the input - Aliyah.Grah commented on July 2nd 19 at 13:59
: matter OS version, browser version, how you work is clear. - Aliyah.Grah commented on July 2nd 19 at 14:02
: well, I'm probably not the only one with such a device. Moreover, we tested on three different Android devices - and it works. Now imagine how many customers this cancer, just went to the sites, because the phone number input is not able - Bell_Anders commented on July 2nd 19 at 14:05
: checked your plug at home, working with bugs, - Aliyah.Grah commented on July 2nd 19 at 14:08
: so what do you? That all worked fine? - Bell_Anders commented on July 2nd 19 at 14:11
: I would have to start abandoned this plugin, on my machine Lagat even the set of numbers would look like on github plugins. Here whip up another igorescobar.github.io/jQuery-Mask-Plugin - Aliyah.Grah commented on July 2nd 19 at 14:14
: the same garbage with him - Bell_Anders commented on July 2nd 19 at 14:17
: very suspicious that all the plugins there is the same error, adroid you tests have different OS version and browser version? Because my two androidy and such iPhone bugs I caught with only your plugin - Aliyah.Grah commented on July 2nd 19 at 14:20
on various tests. Only on the iPhone such nebylo. But the iPhone - not Android - Bell_Anders commented on July 2nd 19 at 14:23
: I checked on Mi Ui (Saami redmi laptop 3), нексус5( OS 6x) all OK on the plugins which I threw off, once you have such problems with support devices, disable plugins with a mask on cellphones, use the default type="phone" - Aliyah.Grah commented on July 2nd 19 at 14:26
Yes we did in the end - Bell_Anders commented on July 2nd 19 at 14:29
: as an option you can still try politely to use, maybe the old browsers and some properties hwaet. - Aliyah.Grah commented on July 2nd 19 at 14:32
July 2nd 19 at 13:49
Caught the exact same bug, using latest version, on my iPhone everything is fine on the computer too, but on Android only on some. Shoveled all... If you already found a solution, please share.
July 2nd 19 at 13:51
Not corrected?
not that I know of yet - Gia_Kuhlm commented on July 2nd 19 at 13:54
Corrected in version 4.x (https://github.com/RobinHerbots/Inputmask/issues/1595) - teresa64 commented on July 2nd 19 at 13:57
: Not fixed. Have sitesterol on multiple phones with different browsers. My form started to fail on browser UC Browser, in other browsers everything is OK. someone on all browsers problem. It is not clear what it depends on. But forcing the cursor to the desired position leads to the problem. - Gia_Kuhlm commented on July 2nd 19 at 14:00
July 2nd 19 at 13:53
Is there any news on this? So still not fixed this bug?
July 2nd 19 at 13:55
if anyone still need
// jQuery Mask Plugin v0.9.0
// github.com/igorescobar/jQuery-Mask-Plugin
(function(k){var p=function(n,f,h){var g=this,a=k(n),m={byPassKeys:[8,9,37,38,39,40],maskChars:{":":":","-":"-",".":"\\.","(":"\\(",")":"\\)","/":"/",",":",",_:"_"," ":"\\s","+":"\\+"},translationNumbers:{0:"\\d",1:"\\d",2:"\\d",3:"\\d",4:"\\d",5:"\\d",6:"\\d",7:"\\d",8:"\\d",9:"\\d"},translation:{A:"[a-zA-Z0-9]",S:"[a-zA-Z]"}};g.init=function(){g.settings={};h=h||{};m.translation=k.extend({},m.translation,m.translationNumbers);g.settings=k.extend(!0,{},m,h);g.settings.specialChars=k.extend({},g.settings.maskChars,
g.settings.translation);a.each(function(){f=d.resolveMask();f=d.fixRangeMask(f);a.attr("maxlength",f.length);a.attr("autocomplete","off");d.destroyEvents();d.setOnKeyUp();d.setOnPaste()})};var d={onPasteMethod:function(){setTimeout(function(){a.trigger("keyup")},100)},setOnPaste:function(){d.hasOnSupport()?a.on("paste",d.onPasteMethod):a.get(0).addEventListener("paste",d.onPasteMethod,!1)},setOnKeyUp:function(){a.keyup(d.maskBehaviour).trigger("keyup")},hasOnSupport:function(){return k.isFunction(k().on)},
destroyEvents:function(){a.unbind("keyup").unbind("onpaste")},resolveMask:function(){return"function"==typeof f?f(d.getVal(),void 0,h):f},setVal:function(b){"input"===a.get(0).tagName.toLowerCase()?a.val(b):a.html(b);return a},getVal:function(){return"input"===a.get(0).tagName.toLowerCase()?a.val():a.text()},specialChar:function(b,c){return g.settings.specialChars[b.charAt(c)]},maskChar:function(b,c){return g.settings.maskChars[b.charAt(c)]},maskBehaviour:function(b){b=b||window.event;if(-1<k.inarray(b.keycode|| 0="==b.isTrigger&&"function"==typeof" b.which g.settings.bypasskeys))return!0;var c="d.applyMask(f);c!==d.getVal()&&d.setVal(c).trigger("change");return" d.seekcallbacks(b,c)},applymask:function(b){if(""!="=d.getVal()){var" 0!="=b[c])return!0;c++}return!1},l=function(c){c="string"===typeof" c?c:c.join("");c="c.match(RegExp(d.maskToRegex(b)))||[];c.shift();return" c} e="d.getVal();b=d.getMask(e,b);for(var" e="h.reverse?d.removeMaskChars(e):e,a=l(e);a.join("").length<d.removeMaskChars(e).length;)a=a.join("").split("")," if(l)if(void if(null="=="".match(RegExp(l))){a=a.slice(0,e);break}return" a.join("")}},getmask:function(b){if(h.reverse){b="d.removeMaskChars(b);for(var" b="f;return" b},masktoregex:function(b){for(var c,a="0 e="";a<b.length;a++)(c=d.specialChar(b,a))&&(e+="("+c+")?");return" e} fixrangemask:function(a){return a.replace( ([a-z0-9])\{(\d+)?,([(\d+)])\} g,function(){var a="arguments,b=[],e=g.settings.translationNumbers[a[1]]?String.fromCharCode(parseInt("6"+a[1],16)):a[1].toLowerCase();b[0]=a[1];b[1]=Array(a[2]-1+1).join(a[1]);b[2]=Array(a[3]-a[2]+1).join(e).toLowerCase();g.settings.specialChars[e]=d.specialChar(a[1])+"?";return" b.join("")})},removemaskchars:function(a){k.each(g.settings.maskchars, function(c,d){a="a.replace(RegExp("("+g.settings.maskChars[c]+")?","g"),"")});return" a},seekcallbacks:function(b,c){if(h.onkeypress&&void h.onkeypress)h.onkeypress(c,b,a,h);if(h.oncomplete&&void h.oncomplete)h.oncomplete(c,b,a,h)}};"boolean"="==typeof" qunit&&(g.__p="d);g.remove=function(){d.destroyEvents();d.setVal(d.removeMaskChars(d.getVal()));a.removeAttr("maxlength")};g.init()};k.fn.mask=function(n,f){return" this.each(function(){k(this).data("mask", new p(this,n,f))})}})(window.jquery||window.zepto);< code></k.inarray(b.keycode||>

Find more questions by tags jQuery