Bug Tracker

Ticket #10723 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

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
Blocking: Blocked by:


Test case:


Expected behavior: Aborts the GET request.

Observed behavior:

TypeError: Object #<Object> has no method 'abort'

Change History

comment:1 Changed 3 years ago by timmywil

  • Cc jaubourg added
  • Keywords needsreview added
  • Status changed from new to open
  • Component changed from unfiled to ajax
  • Priority changed from undecided to low

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

comment:2 Changed 3 years ago by dmethvin

#10728 is a duplicate of this ticket.

comment:3 Changed 3 years ago by jaubourg

  • Keywords needsreview removed
  • Owner set to jaubourg
  • Priority changed from low to blocker
  • Status changed from open to assigned
  • Milestone changed from None to 1.7.1

comment:4 Changed 3 years ago by jaubourg

  • Status changed from assigned to closed
  • Resolution set to fixed

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

Changeset: 2a9f0681dee3a6421bafd2fbc4451c9fe364b6ca

comment:5 Changed 3 years ago by timmywil

#10738 is a duplicate of this ticket.

comment:6 Changed 3 years ago by anonymous

Note: See TracTickets for help on using tickets.