#6951 closed bug (worksforme)
.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: |
Description
I tried even on the demo on live jquery site, .keydown() does not handle the Enter button.
Change History (2)
comment:1 Changed 12 years ago by
Priority: | → undecided |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
comment:2 Changed 12 years ago by
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.
Note: See
TracTickets for help on using
tickets.
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.