Skip to main content

Bug Tracker

Side navigation

#14695 closed bug (notabug)

Opened January 15, 2014 04:35PM UTC

Closed January 20, 2014 11:18PM UTC

keypress behavior on select tag differs depending on multiple attribute

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

Attachments (0)
Change History (1)

Changed January 20, 2014 11:18PM UTC by dmethvin comment:1

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.