#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: | [email protected]… | |
Blocked by: | Blocking: |
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 (1)
Change History (7)
Changed 12 years ago by
Attachment: | code.jquery.com jquery-1.4.2.js added |
---|
comment:1 Changed 12 years ago by
Milestone: | 1.4.2 |
---|---|
need: | Patch → Review |
Priority: | → undecided |
On which specific versions of IE does this occur?
comment:2 Changed 12 years ago by
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 12 years ago by
Component: | unfiled → ajax |
---|---|
Milestone: | → 1.4.3 |
need: | Review → Commit |
Owner: | set to snover |
Priority: | undecided → blocker |
Status: | new → assigned |
I was easily able to reproduce this in QUnit. Looks like IE7’s ‘native’ XHR is not as native as Microsoft claimed. Pull request
comment:5 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
File with the issue fixed to be applyed to the correct SVN sources