Ticket #7018 (closed bug: fixed)
Bug in some specific subversion at IE 7 in $.ajax
| Reported by: | blagus | Owned by: | snover |
|---|---|---|---|
| Priority: | blocker | Milestone: | 1.4.3 |
| Component: | ajax | Version: | 1.4.2 |
| Keywords: | Cc: | lex@… | |
| Blocking: | Blocked by: |
Description
In some very specific versions of IE7, a javascript bug occours in $.ajax: "Object doesn't support this property or method" Line 5234 Character 6
I am using the non-compressed version of jQuery to debug this issue (code.jquery.com jquery-1.4.2.js)
I found a solution and I would update directly on SVN, but as soon I am not very good using SVN systems, I'll publish the solution here so you guys can path this bug in the correct SVN target file
Between the lines 5227 and 5238 reads:
Override the abort handler, if we can (IE doesn't allow it, but that's OK) Opera doesn't fire onreadystatechange at all on abort try {
var oldAbort = xhr.abort; xhr.abort = function() {
if ( xhr && oldAbort.call ) {
oldAbort.call( xhr );
}
onreadystatechange( "abort" );
};
} catch(e) { }
Override the abort handler, if we can (IE doesn't allow it, but that's OK) Opera doesn't fire onreadystatechange at all on abort try {
var oldAbort = xhr.abort; xhr.abort = function() {
if ( xhr ) {
oldAbort.call( xhr );
}
onreadystatechange( "abort" );
};
} catch(e) { }
Must be updated to:
Override the abort handler, if we can (IE doesn't allow it, but that's OK) Opera doesn't fire onreadystatechange at all on abort try {
var oldAbort = xhr.abort; xhr.abort = function() {
if ( xhr && oldAbort.call ) {
oldAbort.call( xhr );
}
onreadystatechange( "abort" );
};
} catch(e) { }
Override the abort handler, if we can (IE doesn't allow it, but that's OK) Opera doesn't fire onreadystatechange at all on abort try {
var oldAbort = xhr.abort; xhr.abort = function() {
if ( xhr && oldAbort.call ) {
oldAbort.call( xhr );
}
onreadystatechange( "abort" );
};
} catch(e) { }
The very small change to address this solution is: if ( xhr ) { TO if ( xhr && oldAbort.call ) {
Feel free to contact me via e-mail with further details Thank you very much in advance
Attachments
Change History
Changed 3 years ago by blagus
-
attachment
code.jquery.com jquery-1.4.2.js
added
comment:1 Changed 3 years ago by snover
- need changed from Patch to Review
- Priority set to undecided
- Milestone 1.4.2 deleted
On which specific versions of IE does this occur?
comment:2 Changed 3 years ago by dmethvin
I can see how this might happen on IE, since the abort "function" most likely is not a native Javascript object and so does not have a call method. The comment indicates IE doesn't allow it; I wonder if there's a difference in behavior between the native XHR that IE added and the ActiveX implementation.
comment:3 Changed 3 years ago by snover
- Status changed from new to assigned
- Component changed from unfiled to ajax
- Priority changed from undecided to blocker
- Owner set to snover
- Milestone set to 1.4.3
- need changed from Review to Commit
I was easily able to reproduce this in QUnit. Looks like IE7’s ‘native’ XHR is not as native as Microsoft claimed. Pull request
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

File with the issue fixed to be applyed to the correct SVN sources