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
Key events don't work properly on Android Chrome (with default keyboard) #982
Comments
Chrome returns 229 as the keyup value for everything. Tested on android 5.1.1 phone and android 6 phone, latest chrome browser. https://jsfiddle.net/milanraval/eu8tw2wk/ Screenshot is mac on left, android 6 phone on right. |
A long thread about the issue: https://bugs.chromium.org/p/chromium/issues/detail?id=118639 |
Does it ignore the key events because of this? substance/packages/surface/Surface.js Line 254 in 28a8692
|
I read some of the comments in that long thread.. installing hacker's keyboard will fix the issue (sends correct key codes) with the typing and the save button getting triggered properly. https://play.google.com/store/apps/details?id=org.pocketworkstation.pckeyboard&hl=en So it appears to be an issue dealing with the returned key codes. |
Actually.. using hackers keyboard makes everything work as well as it does on desktop. Something like this library may help augment the problem (or some kind of input event abstraction?): https://github.com/liftoff/HumanInput |
Hey @rquast, Thanks for collecting this information. The tenor in the thread seems to be either using physical keyboards or not relying on keyboard events at all when it comes to mobile devices. substance/packages/surface/Surface.js Lines 104 to 132 in 28a8692
Mobile devices is on our agenda, but we won't be able to address the next 3 months. |
@oliver---- yes, good idea. Someone else may do some more work on this or come up with a good solution. The thread didn't seem to have any great solutions from what I could read. |
I am pretty sure things are good here now. You may want to test it out. |
I faced the same issue, my solution is $('.NumDotOnly').on('input', function (event) { $(".AlphaDotOnly").on("input", function (event) { $(".AlphaOnly").on("input", function (event) { Reference: https://stackoverflow.com/a/19111723/4425004 |
working, thanks |
Url for the stackoverflow link is missing btw, it's just (url) in markdown. |
There are heated discussions in Chromium about this issue since 2012. So far, no solution. https://bugs.chromium.org/p/chromium/issues/detail?id=118639 |
URL for stackoverflow could be My QA for the Issue |
@Praneshjs It's working. Thank you so much |
With my experience i would like to share my knowledge, Desktop Browsers
Android Mobile Browser (Chrome)
Note:
Let me know is there are any ways to detect cursor position in input[type="number"]. Suggestion For Desktop browsers, use input[type="text"] to handle cases like keypress event and replace some values using cursor position. For Android browsers, use input[type="tel"] to handle same cases mentioned above. |
Thank you very much, this has been very helpful |
I've been trying substance (latest dev), and noticed that the key events or something aren't properly firing on android chrome, which causes quite a few bugs (like not activating the check/save button, or delete key not working, etc).
Is there anything I could do to help with that?
The text was updated successfully, but these errors were encountered: