New issue
Advanced search Search tips

Issue 740916 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

e.ctrlKey is coming false on keyup event listener

Reported by akshansh...@gmail.com, Jul 11 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36

Steps to reproduce the problem:
1. Add event listener for keyup:

window.addEventListener("keyup", handleKeyUp)

function handleKeyUp(e)
{
   console.log(e.ctrlKey) == > coming false;
   console.log(e.keyCode) == > coming 17, which is ctrlKey.
}

2. Press Ctrl Key
3. e.CtrlKey is coming false, but keycode is coming right.

What is the expected behavior?
e.CtrlKey must be true.

What went wrong?
e.CtrlKey is coming false.

Did this work before? No 

Chrome version: 59.0.3071.115  Channel: stable
OS Version: 10.0
Flash Version:
 

Comment 1 by rtoy@chromium.org, Jul 11 2017

Cc: rtoy@chromium.org
Labels: Needs-Feedback
According to https://stackoverflow.com/questions/21981913/evt-ctrlkey-returns-false-in-jquery-keyup-event, this is the correct behavior for keyup. Perhaps you want the keydown event?
Thanks ! If it's by w3c spec then my problem is solved.
Project Member

Comment 3 by sheriffbot@chromium.org, Jul 12 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "rtoy@chromium.org" to the cc list and removing "Needs-Feedback" label.

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

Comment 4 by junov@chromium.org, Jul 12 2017

Status: WontFix (was: Unconfirmed)

Sign in to add a comment