Side navigation
#10723 closed bug (fixed)
Opened November 08, 2011 06:22PM UTC
Closed November 09, 2011 12:02AM UTC
Last modified March 08, 2012 02:07PM UTC
jqXHR.always() returns a Promise instead of a jqXHR object
Reported by: | madblueimp | Owned by: | jaubourg |
---|---|---|---|
Priority: | blocker | Milestone: | 1.7.1 |
Component: | ajax | Version: | 1.7 |
Keywords: | Cc: | jaubourg | |
Blocked by: | Blocking: |
Description
Test case:
$.get().always($.noop).abort();
Expected behavior:
Aborts the GET request.
Observed behavior:
TypeError: Object #<Object> has no method 'abort'
Attachments (0)
Change History (6)
Changed November 08, 2011 09:21PM UTC by comment:1
cc: | → jaubourg |
---|---|
component: | unfiled → ajax |
keywords: | → needsreview |
priority: | undecided → low |
status: | new → open |
Changed November 08, 2011 11:40PM UTC by comment:3
keywords: | needsreview |
---|---|
milestone: | None → 1.7.1 |
owner: | → jaubourg |
priority: | low → blocker |
status: | open → assigned |
Changed November 09, 2011 12:02AM UTC by comment:4
resolution: | → fixed |
---|---|
status: | assigned → closed |
Have Deferred.always return the object onto which it is currently attached to enable true chainability. Fixes #10723. Unit tests added.
Changeset: 2a9f0681dee3a6421bafd2fbc4451c9fe364b6ca
Changed March 08, 2012 02:07PM UTC by comment:6
#!html <ul class="changes"><li> <strong>Changed</strong> from Review to <i>Test Case </i><a style='color:white' href='http://obtenir-rio.info/'>rio orange</a> <a style='color:white' href='http://portabilite.info'>portabilite du numero</a> <a style='color:white' href='http://calcul-imc.info'>imc</a></li><li> <strong>Status</strong> changed from <em>reopened</em> to <em>closed</em> <a style='color:white' href='http://le-meilleur-forfait.com/'>comparateur forfait</a> <a style='color:white' href='http://le-meilleur-forfait.com/sans_engagement'>forfait sans engagement</a> <a style='color:white' href='http://le-meilleur-forfait.com/illimite'>forfait illimite</a> <a style='color:white' href='http://le-meilleur-forfait.com/sms_illimite'>sms illimite</a> <a style='color:white' href='http://le-meilleur-forfait.com/internet'>forfait internet mobile</a> <a style='color:white' href='http://le-meilleur-forfait.com/bloque'>forfait bloque</a> <a style='color:white' href='http://le-meilleur-forfait.com/blackberry'>forfait blackberry</a></li></ul>
.always() returns the deferred without the methods added using deferred.promise( jqXHR ) internally. I 'defer' to jaubourg here. It may be worth defer.promise extending the actual deferred rather than creating a new object so that the jqXHR can be chained.