Skip to main content

Bug Tracker

Side navigation

#5869 closed bug (fixed)

Opened January 19, 2010 06:08PM UTC

Closed January 23, 2010 05:53PM UTC

Last modified March 09, 2012 01:12PM UTC

SELECT element change event firing on focus first time in IE

Reported by: nberardi Owned by: brandon
Priority: major Milestone: 1.4.1
Component: event Version: 1.4
Keywords: Cc:
Blocked by: Blocking:
Description

This bug is very easy to reproduce. I have personally verified it exists in IE 7 and 8.

I have this simple select:

<select name="zlecenia_index_icpp" id="items_per_page">

<option value="10">10</option>

<option value="25" selected="selected">25</option>

<option value="50">50</option>

</select>

and the following code is used for the change event:

$('#items_per_page').change(function(){

var controller_action = this.name.replace(/_/g, '/');

location.href = config.base_url + '/' + controller_action + '/'+this.value;

});

This code used to work in jQuery 1.3, but in 1.4 the change event is fired as soon as I click on the select box. This only happens one time and then functions normally.

I can't verify the actual problem but it works alot like this code:

$('#items_per_page').one("focus", function() { ... });

Here is where it was originally reported, or at least where I saw a confirmation that others were experiencing my same issue.

http://stackoverflow.com/questions/2093121/jquery-1-4-change-event-bug-in-ie

Attachments (0)
Change History (3)

Changed January 20, 2010 02:28AM UTC by dmethvin comment:1

resolution: → fixed
status: newclosed

Changed January 22, 2010 06:38PM UTC by mcurry comment:2

resolution: fixed
status: closedreopened

Still broke. Same test case above. Setting one of the options as selected is important.

Fix here:

http://github.com/mcurry/jquery/commit/a293f5938eb9efd41158b948f487672d43b7c820

Changed January 23, 2010 05:53PM UTC by john comment:3

priority: criticalmajor
resolution: → fixed
status: reopenedclosed