Skip to main content

Bug Tracker

Side navigation

#7698 closed bug (patchwelcome)

Opened December 03, 2010 08:31PM UTC

Closed December 03, 2010 09:24PM UTC

Last modified March 13, 2012 09:43PM UTC

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:
Description

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.

Attachments (0)
Change History (4)

Changed December 03, 2010 08:47PM UTC by danheberden comment:1

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

Changed December 03, 2010 08:52PM UTC by danheberden comment:2

_comment0: 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/as7EN/38/1291409563230764

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/

Changed December 03, 2010 09:24PM UTC by danheberden comment:3

_comment0: 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 the problem :D1291411535889547
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

Changed December 06, 2010 10:50PM UTC by jy1337 comment:4

_comment0: I believe this issue should be looked at a little more, it used to work in 1.3.2 with IE8 and it's now broken. \ \ From the 1.4 release notes: \ \ "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'''." \ \ IMO it looks like this has also introduced the bug in question.1291691685927229

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.

2. 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.

3. 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 :)