#6256 closed bug (duplicate)
IE8 AJAX GET request fails due to unexpected call to abort handler
Reported by: | ratbert | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.5 |
Component: | ajax | Version: | 1.5 |
Keywords: | abort, xhr | Cc: | snover, SlexAxton |
Blocked by: | Blocking: |
Description
jquery 1.4.2 has the following code in the AJAX request handler:
Line 5229:
try {
var oldAbort = xhr.abort; xhr.abort = function() {
if ( xhr ) {
oldAbort.call( xhr );
}
onreadystatechange("abort");
};
} catch(e) { }
I'm no javascript expert, but the line "var oldAbort = xhr.abort;" doesn't look like a function call to me. On IE8 though it seems that the xhr.abort function is actually called and the xhr goes dead (ready state 1 -> 0) and the xhr.send() that follows then fails.
Hacking the line to "var oldAbort = null;" allows the xhr.send() to succeed and my AJAX request works.
Notes:
This is not a proposed fix - good luck with that ;)
This form of override of current handlers, or callbacks, or whatever, is not uncommon in jQuery I think. I wonder how many other case there are that IE8 barfs on... Thanks a lot microsoft.
Change History (6)
comment:1 Changed 13 years ago by
comment:3 Changed 12 years ago by
Cc: | snover SlexAxton added |
---|---|
Keywords: | abort xhr added |
Milestone: | 1.4.3 → 1.4.5 |
Priority: | → undecided |
Resolution: | → duplicate |
Status: | new → closed |
This is a duplicate (notably of a newer bug), but since that one was marked as fixed. I'll mark this as such.
Does anyone have an opinion about calling oldAbort()
like he does in the patch here? Is that safe? If anyone feels strongly about this, can you file an enhancement ticket for it? It'd be an easy addition.
The commit is here: https://github.com/jquery/jquery/commit/9b655a176b0d045c3773357761acf2fa93cd9650
comment:5 Changed 12 years ago by
Version: | 1.4.2 → 1.5 |
---|
There wasn't a 1.4.5 release, was actually 1.5.
comment:6 Changed 12 years ago by
Milestone: | 1.4.5 → 1.5 |
---|
There was no 1.4.5 release, was actually 1.5.
Hello,
here is a patch for this issue that works on all browsers and make .abort () work correctly on IE{6,7,8}.
Against jquery.js 1.4.2.
Hope this helps,
~Marcello