Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#7698 closed bug (patchwelcome)

Change event not firing in IE 8 when releasing mouse outside of multiple select

Reported by: jy1337 Owned by:
Priority: undecided Milestone: 1.6
Component: unfiled Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:


Let's say you have a multiple select list and you use jQuery 1.4.4 to detect the change event. This will work fine under Firefox 3.6.12 and IE 8 under normal conditions. But in IE, if you select something in the list, and you don't release the mouse until after your cursor is outside of the select, the event will not be fired. Doing that works in Firefox.

You can test an example here: http://jsfiddle.net/as7EN/1/

Please note that this bug was introduced back in 1.4.2 and was not present in 1.3.2, as the Fiddle can attest.

Change History (4)

comment:1 Changed 12 years ago by danheberden

The behavior you're describing is also present in chrome (does not fire)

comment:2 Changed 12 years ago by danheberden

Part of the problem is that the event, in most browsers, wont dispatch once the mouse has left. Similar to clicking the close button of your browser window, holding the mouse button, and dragging off of it. It doesn't count.

If you need to monitor the change, however, there are other tools at your disposal: http://jsfiddle.net/danheberden/pgaw7/

Last edited 12 years ago by danheberden (previous) (diff)

comment:3 Changed 12 years ago by danheberden

Resolution: patchwelcome
Status: newclosed

You're definitely right, it'd be nice if change could cover these gaps! Unfortunately, when the browser doesn't quite accurately dispatch the events we think it should, it's difficult to cover situations like this. (also, Chrome doesn't work in 1.3.2 either :/ )

Luckily, there are options available to you via other events to facilitate a solution that meets the needs of your application :D

Last edited 12 years ago by danheberden (previous) (diff)

comment:4 Changed 12 years ago by jy1337

Please allow me to insist, I think it's a real bug and, to me at least, a big deal for my user interface.

My arguments:

  1. It was working under 1.3.2 and starting with 1.4 stopped working.
  1. Coincidentally, the release notes from 1.4 state the following:

"The change and submit events work reliably across browsers for both normal and live events. We override the normal change and submit events in Internet Explorer and replace them with events that work identically to the other browsers."

So there has been a change concerning the change event in IE.

  1. When I use the native Javascript event onchange, the behavior is as expected.

All these elements seem to point to a bug in jQuery. I would appreciate very much if the dev assigned to this function could take a look at this ticket. Unless you are that dev, then you're already taking a look, so thanks :)

Last edited 12 years ago by jy1337 (previous) (diff)
Note: See TracTickets for help on using tickets.