Skip to main content

Bug Tracker

Side navigation

#9934 closed bug (invalid)

Opened July 28, 2011 11:21PM UTC

Closed August 12, 2011 07:58AM UTC

Last modified March 09, 2012 10:56PM UTC

Keypress event for body tag not firing in Firefox 5.0.1

Reported by: seancaetanomartin@gmail.com Owned by: seancaetanomartin@gmail.com
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.

Attachments (0)
Change History (3)

Changed July 29, 2011 12:24AM UTC by etiger13 comment:1

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/

Changed July 29, 2011 01:06AM UTC by dmethvin comment:2

owner: → seancaetanomartin@gmail.com
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?

Changed August 12, 2011 07:58AM UTC by trac-o-bot comment:3

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!