New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 843558 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows
Pri: 2
Type: Bug



Sign in to add a comment

Releasing key produces keydown of other key, that's already pressed

Reported by tenrys...@gmail.com, May 16 2018

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/66.0.3359.139 Chrome/66.0.3359.139 Safari/537.36

Steps to reproduce the problem:
1. Add event listener to keydown and keyup events
2. Hold down a key, e.g. S
3. Hold down a second key, e.g. D
4. Release first key (S)

What is the expected behavior?
The following events should be triggered: keydown (S), keydown (D), keyup (S)

What went wrong?
The following events are triggered: keydown (S), keydown (D), keyup (S), keydown (D).

The second key is seemingly pressed again after releasing the first one. Not reproducible in Firefox.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 66.0.3359.139  Channel: n/a
OS Version: 4.13.0.41-generic
Flash Version: 

See also my Stack Overflow post with example code: https://stackoverflow.com/questions/50372849/pressing-2-keys-release-1-produces-keydown-of-other-key-again
 
keydown.js
175 bytes View Download
Labels: Needs-Triage-M66
Cc: krajshree@chromium.org
Labels: Triaged-ET Needs-Feedback
Tried testing the issue on ubuntu 17.10 using chrome latest stable #66.0.3359.181.

Attached a screen cast for reference.

Following are the steps followed to reproduce the issue.
------------
1. Navigated to https://stackoverflow.com/questions/50372849/pressing-2-keys-release-1-produces-keydown-of-other-key-again.
2. Ran the code snippet.
3. Observed that the output is blank.

tenrysora@ - Could you please provide any other sample url to test the issue from TE-end. This will help us in triaging the issue further.

Thanks...!!
843558.webm
8.1 MB View Download

Comment 3 by tenrys...@gmail.com, May 17 2018

Hello,

I don't know how to use the "Run code snippet" feature, it was edited by someone else.

I use the devtools (F12), execute the code snippet in the console there and watch the console output while the main document is focused.

Alternatively, add the code snippet to any plain HTML file and open it in a browser (as attached to this comment).
keydown.html
442 bytes View Download
Project Member

Comment 4 by sheriffbot@chromium.org, May 17 2018

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 5 by eirage@chromium.org, May 17 2018

Labels: OS-Windows
Owner: eirage@chromium.org
Status: Assigned (was: Unconfirmed)
Can reproduce with the given code sample in both windows and linux

Comment 6 by lar...@gmail.com, Jun 1 2018

There seem to be some order to this:  pressing and holding 'q','w' and 'e' at the same time, produce one extra 'q' (the left most key - probably lowest numbered in the bunch) keydown (evt.repeat == false) after a bit less than a second, where the repeat would probably start.  Lifting 'e' then produces yet another 'q' keydown (again evt.repeat == false) and again when lifting 'w'.

Me:
Ubuntu 17.10, Lenovo X270

UA: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36

Comment 7 Deleted

Comment 8 by lar...@gmail.com, Jun 4 2018

I just tried on ChromeOS (just updated, stable channel).

The behavior is slightly different:

pressing e.g. 'q' and 'w' at the same time, then releasing 'w' within a second, *seems* to fire another 'q' keydown.  I have to verify with some more tests but wanted to report in case someone is looking at it :)

Sign in to add a comment