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 comment:1
resolution: | → fixed |
---|---|
status: | new → closed |
Changed January 22, 2010 06:38PM UTC by comment:2
resolution: | fixed |
---|---|
status: | closed → reopened |
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 comment:3
priority: | critical → major |
---|---|
resolution: | → fixed |
status: | reopened → closed |
Landed w/ test case.
http://github.com/jquery/jquery/commit/f6ec9d54d11432b91577addab6e613fb1f7a5203
Should be fixed by this commit for 1.4.1:
http://github.com/jquery/jquery/commit/435772e29b4ac4ccfdefbc4045d43f714e153381