Side navigation
#6471 closed bug (duplicate)
Opened April 22, 2010 12:50PM UTC
Closed October 26, 2010 02:32PM UTC
Last modified March 13, 2012 08:42PM UTC
XHR request sometimes throw an error when it is aborted in IE8
| Reported by: | mefcorvi | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.4.3 |
| Component: | ajax | Version: | 1.4.2 |
| Keywords: | ie8 ajax xhr abort | Cc: | |
| Blocked by: | Blocking: |
Description
In some cases "abort" method in IE8 (8.0.6001.18702IC) invokes onreadystatechange with readyState = 4.
I've fixed it in my code. I replaced
try {
var oldAbort = xhr.abort;
xhr.abort = function() {
if ( xhr ) {
oldAbort.call( xhr );
}
onreadystatechange( "abort" );
};
} catch(e) { }
to
try {
var oldAbort = xhr.abort;
xhr.abort = function() {
if ( xhr ) {
xhr.onreadystatechange = jQuery.noop;
oldAbort.call( xhr );
}
onreadystatechange( "abort" );
};
} catch(e) { }