-
7 May 2012 5:50 AM #1
[4.1.1 rc1] Ext.Ajax.abort() does not abort the request in Chrome
[4.1.1 rc1] Ext.Ajax.abort() does not abort the request in Chrome
REQUIRED INFORMATION Ext version tested:
- Ext 4.1.0
- Ext 4.1.1 RC1 (4/30)
- Chrome (18.0.1025.168 )
- IE9
- FF3
- <!DOCTYPE HTML>
- Ajax requests does not get aborted when using Chrome
- Load the test case and set up an appropriate URL
- load the page
- All ajax requests must be aborted
- Screen from FF with Firebug:
- Capture7.jpg
- None of the requests was aborted
- Capture8.jpg
Code:var req = Ext.Ajax.request({ url: './test/ajaxabort', success: function(response){ console.log('success',response); }, failure: function (response){ console.log('failure',response); } }); Ext.Ajax.abort(req); req = Ext.Ajax.request({ url: './test/ajaxabort', success: function(response){ console.log('success',response); }, failure: function (response){ console.log('failure',response); } }); Ext.Ajax.abort(req); req = Ext.Ajax.request({ url: './test/ajaxabort', success: function(response){ console.log('success',response); }, failure: function (response){ console.log('failure',response); } }); Ext.Ajax.abort(req); req = Ext.Ajax.request({ url: './test/ajaxabort', success: function(response){ console.log('success',response); }, failure: function (response){ console.log('failure',response); } }); Ext.Ajax.abort(req); req = Ext.Ajax.request({ url: './test/ajaxabort', success: function(response){ console.log('success',response); }, failure: function (response){ console.log('failure',response); } }); Ext.Ajax.abort(req);
HELPFUL INFORMATION Possible fix:- I traced it back and it seems that the method isLoading in Ext.data.Connection returns false because the state = 0....weird... :Code:
isLoading : function(request) { if (!request) { request = this.getLatest(); } if (!(request && request.xhr)) { return false; } var state = request.xhr.readyState; return !(state === 0 || state == 4); },
- only default ext-all.css
- Win7
-
7 May 2012 12:49 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
This is what I get in Chrome 18:
Screen Shot 2012-05-07 at 1.48.22 PM.png
All requests have been canceled (aborted). In FF12 they show aborted and the failure callback is fired just like in Chrome 18. Am I missing something?Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
7 May 2012 2:35 PM #3
Could you please provide me with your test case. Based my test case none of the requests get aborted(in Chrome) , the result is returned from the server, with the data and the success is fired.
Capture9.PNG
-
7 May 2012 2:38 PM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
7 May 2012 8:01 PM #5
In the same boat as Mitchell, I ran your test case, only changing the url to a local page, see the attached screen:abort.jpg
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
7 May 2012 11:37 PM #6
I found the issue and I am happy to say that it was with Chrome, my Chrome. I am migrating to 4.1 and it seems that the browser was still hanging to an old nightly build and not the latest one , which was causing the weird problem with the abort. Silly me..

10x for the help
Cheers
-
9 May 2012 5:26 AM #7Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote