-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Android Information #465
Comments
Finally got to read the docs. I will try out the following events. Maybe they will be accurate on android chrome. |
I meet same problem on my nexus 5 chrome(version 35), Any idea for it? |
The idea is to react on the composition events, but I didn't found the time 2014-07-02 17:05 GMT+02:00 green [email protected]:
|
Hi Robin, Just wondering if this is fixed? |
I haven't found the time to further investigate, ... so no further progress |
Ok thanks for the update Robin. Do you know if there is anyway to workaround or test the browser and remove masking if it is Android > 4? |
@jason-linthwaite You could do some checking on the |
Robin, by "compositioning", do you mean the IME keyboard moving the cursor around and not registering certain softkeyboard events? |
Exactly |
To clarify, this issue only crops up on the default android browser, and only on sub-4.4 devices? |
No also on the other browsers. |
I finded temporary solution for phone mask. Set type input field as "tel" My device Samsung Galaxy S3 |
Using the input type "tel" does indeed work, but this mask "9999AA" is not working on Android (Galaxy Tab 3) with the default Samsung keyboard. When I switch to another keyboard this is working or when I turn off the "Predictive text" option. Also a external (bluetooth) keyboard is working.. |
Robin, I haven't looked at this for a while and just had a brief look through the posts above - did you incorporate a fix? Seems like a tricky problem... |
What's the status on this? I am also having issues using a date mask on Android. |
I guess as long there is no way to control the IME, there is no real solution to the problem. See previous comment. |
@RobinHerbots, okay thank you. |
Hey guys, how are you? I found something that can help with Samsung keyboard or other modified keyboards. Here one guy told to use oninput event, that is similar to onchange event, but occurs immediately after the value of an element has changed, while onchange occurs when the element loses focus, after the content has been changed. http://stackoverflow.com/a/33646354 And here are more information. The last comment says to use onkeyup event to fix samsung keyboard. http://stackoverflow.com/questions/17139039/keycode-is-always-zero-in-chrome-for-android I'll be glad if can help more. |
Cuurent implementation only acts on the input event as the keypress is not fired. Compositionevents are ignored in mobile. |
Hi, I am using this inputmask js plugin latest one in my code.
Regards, |
Still no solution to this error. Using various Galaxy devices and browsers. Input mask plugin is rather useless these days it seems. Android Devices Tested On a side note, the issue is a bit different on Apple devices but still an issue. Apple Devices Tested |
I'm not clear on if this was fixed/worked around or not.... |
The issue has not been fixed. The work around is to use a different masking plugin that doesn't display the mask format on focus but rather adds the mask as the user types. jQuery Mask Plugin seems to work fine, at least the version i have which is v1.5.3. Latest as of this post is 1.14.0 github.com/igorescobar/jQuery-Mask-Plugin |
@nicklello , @zgr024 , The question is what do you call supported! Try both plugins with predictive text on ..... and see them both fail. (the reason see previous comments) |
@zgr024 , Can you have a try with the current version on github and give your thoughts on it. Also include the inputmask.css from within the extra folder. |
Hi, Robin! In initializeColorMask function you getBoundingClientRect from input, but it's wrong, because getBoundingClientRect get top, left, right ,bottom, height, width relative to window. There's a simple example, used the last version of jquery.inputmask.bundle.js. https://whooehoo.github.io/test Just turn on device inspector in Chrome or open page on Android device. My pull request on this bug. |
Was facing same issue, and as quick fix - switched to another library. But they also had exactly same problem and it was fixed, check here. |
Nevermind! Bug fixed on current version! My bad!
|
@uebbi v3.3.11? |
I have found some information that I hope is useful for Android. I have found that this library still breaks on Galaxy devices. I started to look into what was causing some of these issues. As of right now, Galaxy devices are not registering the keys that are pressed. It instead returns 0 for the keydown/up events. I have written several tests to see if I could replicate the issue and spent several days scratching my head to why they were passing when I could clearly break it.
The Jasmine tests that I have written are similar to yours but they are returning a false positive on input. As you can specify in code what key is pressed and so the mask is working if it receives a keycode. Although if it receives keycode 0 (null in Ascii) it does not know how to handle that and allows input before the mask no limit to the number of characters entered.
Here is some of the tests that I have used for trying to identify the problem. For these tests I was using your sendKey and sendKeys methods.
Hope this helps with the advance on Android and mobile devices. 😄
Resources:
Thread on the return 0 issue: https://code.google.com/p/chromium/issues/detail?id=118639
Test for return 0: http://goo.gl/n7IKjF
The text was updated successfully, but these errors were encountered: