Bug Tracker

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#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@…
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)

code.jquery.com jquery-1.4.2.js (160.0 KB) - added by blagus 9 years ago.
File with the issue fixed to be applyed to the correct SVN sources

Download all attachments as: .zip

Change History (7)

Changed 9 years ago by blagus

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

comment:1 Changed 9 years ago by snover

Milestone: 1.4.2
need: PatchReview
Priority: undecided

On which specific versions of IE does this occur?

comment:2 Changed 9 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 9 years ago by snover

Component: unfiledajax
Milestone: 1.4.3
need: ReviewCommit
Owner: set to snover
Priority: undecidedblocker
Status: newassigned

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:4 Changed 9 years ago by snover

#6017 is a duplicate of this bug.

comment:5 Changed 9 years ago by john

Resolution: fixed
Status: assignedclosed

comment:6 Changed 9 years ago by SlexAxton

#6256 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.