Modify ↓
Ticket #8866 (closed bug: fixed)
IE8 input[type=file] delegated change event files only on blur
| Reported by: | glex.spb@… | Owned by: | dmethvin |
|---|---|---|---|
| Priority: | low | Milestone: | 1.7 |
| Component: | event | Version: | 1.5.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
In IE8 change event on file inputs runs only when you focus out of the element if that event was delegated.
jQuery(function($) {
$("#file-container").delegate("input", "change", function(){
alert("Event fired!");
});
});
Test case: http://jsfiddle.net/glebm/n4zYd/2/
Change History
comment:1 Changed 2 years ago by timmywil
- Status changed from new to open
- Component changed from unfiled to event
comment:2 Changed 21 months ago by dmethvin
- Priority changed from undecided to low
Also visible in jquery/test/delegatetest.html but I am not sure how we can fix it. There doesn't seem to be a bubbling event we can catch to determine if the content has changed.
comment:3 Changed 20 months ago by dmethvin
- Owner set to dmethvin
- Status changed from open to assigned
- Milestone changed from 1.next to 1.7
comment:4 Changed 20 months ago by dmethvin
This was fixed in 1.7 by attaching to the non-bubbling event:
https://github.com/jquery/jquery/commit/3bd7bed340f9077d39734ffce366ef2caeb9ce35
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Confirmed test case