Bug Tracker

Modify

Ticket #5658 (closed enhancement: duplicate)

Opened 3 years ago

Last modified 3 years ago

The change event does not fire in Internet Explorer (IE)

Reported by: magleahy Owned by: brandon
Priority: major Milestone: 1.4
Component: event Version: 1.4a1
Keywords: change event internet explorer IE Cc:
Blocking: Blocked by:

Description

Logging this in case it is not already logged.

It might be a choice that the JQuery library doesn't deal with this as it seems to be an IE bug. The problem is that when you click on a input of type radio or checkbox (perhaps more types), and you have attached a change function to these via JQuery, they do not fire as expected in IE, Internet Explorer.

 http://www.quirksmode.org/dom/events/change.html  http://stackoverflow.com/questions/208471/getting-jquery-to-recognise-change-in-ie

I have implemented a fix for IE which uses blur and focus on click event of radio or checkbox, but I am not entirely satisfied that this is a good solution.

Speak great JQuery developers, what do you think? Will this fix come as part of the code in the future or do you just not support workaround for bugs in browsers (which I understand and respect). Any better solution you can think of?

Thanks and keep rockin'! Mag

Change History

comment:1 Changed 3 years ago by magleahy

This is the code I used for the fix:

if ($.browser.msie) { /*IE fix for on change handling ( http://stackoverflow.com/questions/208471/getting-jquery-to-recognise-change-in-ie)*/

$("input:radio, input:checkbox").click(function () {

this.blur(); this.focus();

});

}

comment:2 Changed 3 years ago by dmethvin

That fires change, but it also fires a focus and blur which would cause issues. Your best bet for cross-browser operation if you need immediate notification is to use click.

comment:3 Changed 3 years ago by Standart

comment:4 Changed 3 years ago by dmethvin

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

Dup of #4659.

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.