Skip to main content

Bug Tracker

Side navigation

#13113 closed bug (patchwelcome)

Opened December 24, 2012 07:10PM UTC

Closed January 07, 2013 01:36AM UTC

change event for radio buttons not bubbling on simulated cicks in IE < 9

Reported by: Owned by:
Priority: low Milestone: 1.9
Component: unfiled Version: 1.9b1
Keywords: Cc:
Blocked by: Blocking:

In jQuery 1.8.3, change events generated by simulating a click event on a radio button appear not to bubble as they do if the click is generated by user action.

Notice that if you run this sample in IE8 you will not execute the change event handler unless you click on one of the radio buttons. In IE 9 or most all other browsers you will execute the change event handler when the page loads.

Also of note, is that if the sample is modified so that the change event handler is attached directly to the radio button instead of being delegated by the body element, then the handler will execute on page load for all browsers... even IE8.

This suggest that the change event is not being bubbled when it is generated by a call to click() and is being bubbled when is is generated by the user clicking the radio button in IE8 and lower.

Attachments (0)
Change History (3)

Changed December 28, 2012 12:10AM UTC by dmethvin comment:1

status: newopen

Confirmed. The problem is that the IE propertychange event isn't being fired, which is the just-in-time trigger to attach the direct change event.

Changed December 28, 2012 01:33AM UTC by dmethvin comment:2

milestone: None1.9
priority: undecidedlow

Changed January 07, 2013 01:36AM UTC by dmethvin comment:3

resolution: → patchwelcome
status: openclosed

I looked at solutions for this, but they're pretty complicated and large. A good workaround would be to monitor the click event rather than the change event on the checkbox. I'm marking this patchwelcome but would not want to use a lot of bytes fixing this.