Skip to main content

Bug Tracker

Side navigation

#1360 closed bug ()

Opened July 05, 2007 10:42AM UTC

Closed November 11, 2010 11:09PM UTC

.change() on checkbox in IE

Reported by: stickmus Owned by:
Priority: major Milestone: 1.2.4
Component: event Version: 1.1.3
Keywords: Cc:
Blocked by: Blocking:

Using change() on a checkbox in IE has some odd trigger issues.

The event fires after you click off the box.

As a workaround use the click() function

Attachments (1)
  • 1360.diff (1.2 KB) - added by brandon December 17, 2007 12:11AM UTC.
Change History (8)

Changed July 20, 2007 03:46PM UTC by john comment:1

need: ReviewTest Case
priority: trivialmajor

This is the case with most IE form elements. I'd suspect that if we integrated a change like this, then we should do it for more input types as well (including radios and select boxes).

Changed December 17, 2007 12:13AM UTC by brandon comment:2


The attached patch (1360.diff) uses the new special events api to make the change event into a click event for checkboxes in IE and a focus event for radios in IE and Safari. This seems to work okay except that it will fire the change event on radios when focused even if a change in value didn't occur. However, this is better than nothing.

Changed December 20, 2007 10:14PM UTC by joern comment:3

What about the lack of a change event when changing a text input using the browser's autocomplete feature? Having that fixed, too, would make the change event actually useful.

Changed May 16, 2008 04:02AM UTC by flesler comment:4


Changed July 02, 2008 12:47PM UTC by Andrew comment:5

One odd thing is that there are inconsistencies between a simple <SELECT> and <SELECT multiple='multiple'>, and between browsers. All tests are on XP, jQuery 1.2.6.

On the tests below, the simple <SELECT> can of course have two display states, toggled by the user: I'm using "expanded" to mean it's expanded from the drop-down (several options visible, scrollbar displayed), and "unexpanded" to mean it's displayed as a single line. The keyboard up/down keys are being used to change the SELECT value.

The Change event does gets fired in the following circumstances:

  • <SELECT multiple='multiple'> on Firefox 3, IE7, (Opera 9.5***)
  • <SELECT> unexpanded on Opera 9.5, IE7

but the Change event does not get fired on:

  • <SELECT> unexpanded on Firefox 3
  • <SELECT> expanded on Firefox 3, Opera 9.5, IE7

*** NB Opera 9.5 behaves differently to the other browsers for <SELECT multiple='multiple'>, in that pressing up and down does not change the actual item selected (space must be pressed for that to occur), so no direct comparison is possible. FWIW, space triggers the change event, up/down does not; which is what I would expect.

My intuition led me to expect that change would get fired on all of those circumstances (because the visual feedback from the browser is that the selected option has changed). The one exception is in Opera 9.5 with <SELECT multiple='multiple'>; when up/down are pressed, but space is not, then the visual feedback from the browser is that the selection '''hasn't''' changed, and so I wouldn't expect the change event to fire.

Changed January 08, 2010 11:06AM UTC by Standart comment:6

Changed October 14, 2010 03:14AM UTC by snover comment:7

status: newpending

This ticket has been marked as missing a test case. In an effort to reduce the number of outstanding tickets in the bug tracker, it will be closed automatically in 30 days. In order to prevent this from happening, please provide a working test case. If a test case has already been provided and our records are wrong, please respond to the ticket so that it can be fixed. Thank you!

Changed November 11, 2010 11:09PM UTC by trac-o-bot comment:8

status: pendingclosed

Automatically closed due to 14 days of inactivity.