Ticket #6877 (closed bug: duplicate)
Change event not firing on select box on keypress
| Reported by: | meyerovb | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.4.3 |
| Component: | event | Version: | 1.4.2 |
| Keywords: | Cc: | bryanam@… | |
| Blocking: | Blocked by: |
Description
Test the attached code on ie8 by pressing the down key on the keyboard once the page loads. No alert box appears until you blur the select box. Change the jquery version to 1.2.3 instead of 1.4.2, and you get an alert as soon as you press the down key.
Attachments
Change History
Changed 3 years ago by meyerovb
-
attachment
select_change.html
added
comment:1 Changed 3 years ago by addyosmani
- need changed from Review to Patch
- Priority set to undecided
I've examined your code and tested it across both IE8 and several other browsers (Safari, Chrome, FF) to verify the behaviour experienced.
Although you are able to trigger the alert in IE by manually changing the selected item, as you rightly say - attempting to do this from the keyboard does not execute the alert as it should.
An alternative workaround could be created by modifying your original solution using .keydown() or .keyup() to detect the keystrokes applied to the select.
Flagging for review and possible patch.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Test case