Skip to main content

Bug Tracker

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 timmywil comment:1

cc: → jaubourg
component: unfiledajax
keywords: → needsreview
priority: undecidedlow
status: newopen

.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.

Changed November 08, 2011 11:29PM UTC by dmethvin comment:2

#10728 is a duplicate of this ticket.

Changed November 08, 2011 11:40PM UTC by jaubourg comment:3

keywords: needsreview
milestone: None1.7.1
owner: → jaubourg
priority: lowblocker
status: openassigned

Changed November 09, 2011 12:02AM UTC by jaubourg comment:4

resolution: → fixed
status: assignedclosed

Have Deferred.always return the object onto which it is currently attached to enable true chainability. Fixes #10723. Unit tests added.

Changeset: 2a9f0681dee3a6421bafd2fbc4451c9fe364b6ca

Changed November 09, 2011 06:49PM UTC by timmywil comment:5

#10738 is a duplicate of this ticket.

Changed March 08, 2012 02:07PM UTC by anonymous 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>