Skip to main content

Bug Tracker

Side navigation

#7018 closed bug (fixed)

Opened September 09, 2010 07:03PM UTC

Closed October 09, 2010 08:27PM UTC

Last modified October 27, 2010 05:28PM UTC

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@blag.us
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 September 09, 2010 07:04PM UTC.

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

Change History (6)

Changed September 22, 2010 11:26PM UTC by snover comment:1

milestone: 1.4.2
need: PatchReview
priority: → undecided

On which specific versions of IE does this occur?

Changed September 30, 2010 12:51AM UTC by dmethvin comment:2

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.

Changed October 06, 2010 08:06AM UTC by snover comment:3

component: unfiledajax
milestone: → 1.4.3
need: ReviewCommit
owner: → 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

Changed October 09, 2010 04:15AM UTC by snover comment:4

#6017 is a duplicate of this bug.

Changed October 09, 2010 08:27PM UTC by john comment:5

resolution: → fixed
status: assignedclosed

Changed October 27, 2010 05:28PM UTC by SlexAxton comment:6

#6256 is a duplicate of this ticket.