Skip to main content

Bug Tracker

Side navigation

#6951 closed bug (worksforme)

Opened August 26, 2010 06:04PM UTC

Closed October 02, 2010 11:56PM UTC

Last modified March 13, 2012 09:57PM UTC

.keydown() not working in IE7 for Enter keybutton

Reported by: jtanmay Owned by:
Priority: undecided Milestone: 1.4.3
Component: unfiled Version: 1.4.2
Keywords: .keydown() Cc:
Blocked by: Blocking:

I tried even on the demo on live jquery site, .keydown() does not handle the Enter button.

Attachments (0)
Change History (2)

Changed October 02, 2010 11:56PM UTC by addyosmani comment:1

priority: → undecided
resolution: → worksforme
status: newclosed

The keyCode for the return/enter button is '13'. The demo on the jQuery API Documentation site that lets you test .keydown() is actually doing the following when you hit the return key:

if (event.keyCode == '13') {



If you actually code up your own routine using .keydown() with a simple alert(event.keyCode) and test this in any version of FireFox, Chrome or IE, you'll find that they all correctly capture the enter key being pressed.

I've verified this across IE 7, 8 and 9 just to ensure it's working fine.

Closing ticket.

Changed November 02, 2010 04:34PM UTC by comment:2

I had the same problem, but I believe it has to do with IETester. I was running test in IETester in an IE8 tab and, as the OP said, the Enter key was not being registered for keydown events. I then went to another computer running IE8 without the aid of IETester and the keydown event fired as it should.