JQuery Mask input now working on Android (Samsung Galaxy 4).
After investigating, the keydownEvent handler method, always receives keyCode 229, instead of the correct keyboard key.
similar bug reported here Issue 118639 in chromium: keydown and keyup events do not have proper keyCode
Any workaround to this issue? The a above links suggests some workarounds: e.g. by using the DOM level 3 composition events [compositionstart,compositionupdate and compositionend]
But I'm not sure how to modify the JQuery Mask input code to implement such workaround, I tried following
.bind("keydown.mask", keydownEvent)
.bind("keypress.mask", keypressEvent)
.bind("compositionstart.mask", keydownEvent_com)
.bind("compositionend.mask", keypressEvent_com)
but keydownEvent_com never called.
So, What is the correct way to apply such fix/workaround to JQuery Mask input, or may be a different way to solve such issue.
I could not found clear workaround this issue yet, except excluding the mask if the OS is android (old versions and 4.2.2 ), plus windows Mobile and operating systems which I did not test this feature on, as I can not be user it will work there also.
if (!navigator.userAgent.match(/(Android (1.0|1.1|1.5|1.6|2.0|2.1|4.2.2))|(Windows Phone (OS 7|8.0))|(XBLWP)|(ZuneWP)|(w(eb)?OSBrowser)|(webOS)|(Kindle\/(1.0|2.0|2.5|3.0))/)) {
$(value).mask("999-99-999999?99", {"placeholder": "x"});
}