Bug Tracker

Opened 9 years ago

Closed 9 years ago

#14695 closed bug (notabug)

keypress behavior on select tag differs depending on multiple attribute

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.10.2
Keywords: Cc:
Blocked by: Blocking:

Description

This seems to be a Firefox-only issue.

If a keypress handler is attached to a select tag *without* the multiple attribute and you press enter, the event handler is called with event.which = 13. However, if the select tag *does have* the multiple attribute, then pressing enter does not trigger a keypress event.

Fiddle: http://jsfiddle.net/rq69Q/1/ Adding/removing the multiple attribute changes the behavior.

I'm seeing this in FF 26 on various OSes (WinXP, Win7, OS X, Ubuntu). Apologies if this is Mozilla's bug and not something jQuery can fix.

Change History (1)

comment:1 Changed 9 years ago by dmethvin

Resolution: notabug
Status: newclosed

Note: as the keypress event isn't covered by any official specification, the actual behavior encountered when using it may differ across browsers, browser versions, and platforms. -- http://api.jquery.com/keypress/

You could plead your case to the Mozilla bug tracker, but there's nothing broken in jQuery.

Note: See TracTickets for help on using tickets.