New issue
Advanced search Search tips

Issue 864911 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 118639
Owner: ----
Closed: Jul 18
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Code 229 on any key in keydown event in input of text type

Reported by oleksand...@vaimo.com, Jul 18

Issue description

Steps to reproduce the problem:
1. Using jQuery add keydown event handler to !text! type input
2. Inspect event argument in inspector. See event.keycode and event.which is 229 for any key and event.key is 'Unidentified'

What is the expected behavior?
1. See event.keycode and event.which have correct code of key that is pressed 
2. event.key contains actual char of key pressed

What went wrong?
There is no way of retrieving correct keycode on keydown event for text input. For tel it works as expected.
The solutions you may google for a problem is not really so, as most of them rely on using event.target.value, which is totally incorrect for crossplatform solution or really hard to implement (you can't just subtract value before from current value, it will fail when user will try to edit smth, paste or will found another way to break everything)
Every other browsers, including Chrome for desktop works just fine

Did this work before? Yes Android 5.0.2 with Chrome about 60 version

Does this work in other browsers? Yes

Chrome version: 67.0.3396.87  Channel: stable
OS Version: 6.0
Flash Version: 

Supposed that problem is bind to newer versions of Android and only for input of text type. Changing type to tel eliminates the problem. 
But, as there is no way for user to input some alfa chars on Android in input with type tel, so it can't be considered as really solution. Js hack with calculation of caret position, comparing previous data from input to current is obviously not a solution as well
 
Labels: Needs-triage-Mobile
Mergedinto: 118639
Status: Duplicate (was: Unconfirmed)

Sign in to add a comment