Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#9934 closed bug (invalid)

Keypress event for body tag not firing in Firefox 5.0.1

Reported by: seancaetanomartin@… Owned by: seancaetanomartin@…
Priority: undecided Milestone: None
Component: unfiled Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:

Description

http://jsfiddle.net/dydkJ/

The above fiddle works on chrome, but not on firefox. Under firefox the event handler won't be called.

This ticket is similar to #9689 which was resolved by using the document reference instead of 'body' selector.

Change History (3)

comment:1 Changed 8 years ago by etiger13

doesnt work on Mac Firefox 4 or 3.6

Another example that shows that it is key events that don't work: http://jsfiddle.net/dydkJ/5/show/

comment:2 Changed 8 years ago by dmethvin

Owner: set to seancaetanomartin@…
Status: newpending

Works if the chars are going into a focusable element, and the behavior is independent of jQuery:

http://jsfiddle.net/dmethvin/dydkJ/8/

The W3C seems to indicate this is acceptable:

If the key does not cause text input and is not the Escape key (i.e. if the key is not is an alphanumerical key, a punctuation key, a repeated press of a dead key or the Escape key), terminate this algorithm.

http://www.w3.org/2008/webapps/wiki/Legacy_key_events#Processing_of_Keypress_Events

Quirksmode seems to confirm this interpretation:

keypress - Fires when an actual character is being inserted in, for instance, a text input.

http://www.quirksmode.org/dom/events/keys.html

Is there some connection here with jQuery?

comment:3 Changed 8 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.