Ticket #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: | ||
| Blocking: | Blocked by: |
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
comment:1 Changed 2 years ago by rwaldron
- Priority changed from undecided to low
- Resolution set to duplicate
- Status changed from new to closed
- Component changed from unfiled to event
comment:4 Changed 2 years ago by rwaldron
- Status changed from closed to reopened
- Resolution duplicate deleted
comment:5 Changed 2 years ago by dmethvin
- Status changed from reopened to open
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 21 months ago by dmethvin
Simplified non-jQuery test case for reference, can't test it on IE atm: http://jsfiddle.net/dmethvin/zpnAf/
comment:7 follow-up: ↓ 8 Changed 21 months 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 21 months 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 20 months ago by dmethvin
- Status changed from open to closed
- Resolution set to fixed
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 10 months 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 10 months ago by dan@…
Forgot to mention - I tried it using jQuery 1.7.2
comment:12 follow-up: ↓ 13 Changed 10 months ago by dmethvin
Seems to work for me on Edge (1.8), you had 1.6 selected.
comment:13 in reply to: ↑ 12 Changed 10 months ago by dan@…
Replying to dmethvin:
Seems to work for me on Edge (1.8), you had 1.6 selected.
I was using 1.7.2. Agreed that it works correctly on Edge. I guess there is no reason to reopen it then. Thanks
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
