Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#9595 closed bug (fixed)

.click() event doesn't automatically trigger .change() event in IE7 / IE8

Reported by: jaredcobb@… Owned by:
Priority: low Milestone: 1.next
Component: event Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:

Description

In jQuery 1.6.1, when you trigger a .click() event, the .change() event also automatically fires. However this is not the case in Internet Explorer 7 and 8 (haven't tested older versions). I created a simple example: http://jsfiddle.net/wDKPN/27/

Background: It looks like in jQuery 1.4.4 (all browsers) the .click() event did not also automatically fire the .change() event. I assume the new behavior is on purpose, but simply not working properly in IE7/8

Change History (13)

comment:1 Changed 8 years ago by Rick Waldron

Component: unfiledevent
Priority: undecidedlow
Resolution: duplicate
Status: newclosed

comment:2 Changed 8 years ago by Rick Waldron

Duplicate of #9274.

comment:3 in reply to:  2 Changed 8 years ago by jaredcobb

Replying to rwaldron:

Duplicate of #9274.

I don't believe this is a duplicate. My description is very different than #9274. Can this be re-opened? Please read my description, and you'll see that you can replicate it on jsfiddle

comment:4 Changed 8 years ago by Rick Waldron

Resolution: duplicate
Status: closedreopened

comment:5 Changed 8 years ago by dmethvin

Status: reopenedopen

I just tested this case all the way back to jQuery 1.2.6 in IE6. A programmatic $().click() hasn't ever fired a change. Seems like it should though.

comment:6 Changed 8 years ago by dmethvin

Simplified non-jQuery test case for reference, can't test it on IE atm: http://jsfiddle.net/dmethvin/zpnAf/

comment:7 Changed 8 years ago by anonymous

I've got the problem that IE doesn't even fire click() at all, also not live('click',... nor bind()

comment:8 in reply to:  7 Changed 8 years ago by dvdbrander

Replying to anonymous:

I've got the problem that IE doesn't even fire click() at all, also not live('click',... nor bind()

Sorry, forgot to edit my name, and found out it only fires on buttons, while in other browsers it also fires on divs and others.

comment:9 Changed 8 years ago by dmethvin

Resolution: fixed
Status: openclosed

In the 1.7 change-event rewrite, this works fine for jQuery-attached handlers (the original test case). However, a programmatic click does not fire the inline onchange handler until the blur event. It's a split decision, but since it fixes the OP's case I'll close this as fixed. In general, obscure issues with inline handlers are a wontfix for jQuery, see http://docs.jquery.com/Won%27t_Fix .

comment:10 Changed 7 years ago by dan@…

I just tried the original jsfiddle in IE8/7 (http://jsfiddle.net/wDKPN/27/) and this is still not fixed as described in the original bug report. Can this be re-opened or am I misunderstanding?

comment:11 Changed 7 years ago by dan@…

Forgot to mention - I tried it using jQuery 1.7.2

comment:12 Changed 7 years ago by dmethvin

Seems to work for me on Edge (1.8), you had 1.6 selected.

http://jsfiddle.net/wDKPN/57/

comment:13 in reply to:  12 Changed 7 years ago by dan@…

Replying to dmethvin:

Seems to work for me on Edge (1.8), you had 1.6 selected.

http://jsfiddle.net/wDKPN/57/

I was using 1.7.2. Agreed that it works correctly on Edge. I guess there is no reason to reopen it then. Thanks

Note: See TracTickets for help on using tickets.