Commit 666cc900 authored by Jörn Zaefferer's avatar Jörn Zaefferer

Fix for #534

parent b8d46f7b
......@@ -714,6 +714,10 @@ jQuery.extend({
jQuery.handleError(s, xml, null, e);
}
// firefox 1.5 doesn't fire statechange for sync requests
if(!s.async)
onreadystatechange();
// return XMLHttpRequest to allow aborting the request etc.
return xml2;
},
......
......@@ -44,8 +44,9 @@ test("synchronous request", function() {
});
test("synchronous request with callbacks", function() {
expect(2);
var result;
$.ajax({url: "data/json.php", async: false, success: function(data) { result = data; } });
$.ajax({url: "data/json.php", async: false, success: function(data) { ok(true, "sucess callback executed"); result = data; } });
ok( /^{ "data"/.test( result ), "check returned text" );
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment