Skip to main content

Bug Tracker

Side navigation

#14832 closed bug (notabug)

Opened February 24, 2014 09:17PM UTC

Closed February 25, 2014 04:14AM UTC

ajaxStop triggered later than expected

Reported by: jasonkostempski Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 2.1.0
Keywords: Cc:
Blocked by: Blocking:
Description gets decremented and, if 0, triggers ajaxStop at the end of the 'done' function. I would expect that to happen as soon as the request is done before any callbacks are fired.

In my case I have a flag that gets toggled if there are any ajax requests active which prevents some things from happening if true. I expected that flag to be off inside my success callback function since at that point the request is technically complete but is not until after my success callback exits.

Attachments (0)
Change History (1)

Changed February 25, 2014 04:14AM UTC by dmethvin comment:1

resolution: → notabug
status: newclosed

That design sounds like ill-advised coupling to me. Regardless, since the behavior has been consistent for several years, it would be a bad idea to change it now. We don't document the event order but I think it makes sense that ajaxStop follows the execution of the last active request.