Bug Tracker

Modify

Ticket #5869 (closed bug: fixed)

Opened 3 years ago

Last modified 16 months ago

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:
Blocking: Blocked by:

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

Change History

comment:1 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to fixed

comment:2 Changed 3 years ago by mcurry

  • Status changed from closed to reopened
  • Resolution fixed deleted

Still broke. Same test case above. Setting one of the options as selected is important. Fix here:  http://github.com/mcurry/jquery/commit/a293f5938eb9efd41158b948f487672d43b7c820

comment:3 Changed 3 years ago by john

  • Priority changed from critical to major
  • Status changed from reopened to closed
  • Resolution set to fixed

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.