Wrong events lifecycle in case when ajax request is not async

Author: iovztCreated Oct 27, 2022Updated Oct 27, 2022

When we use container reloading with synchronous ajax request

$.pjax.reload({container: '#pjax-container', async: false});

events fire in following order:

  • pjax:beforeSend
  • pjax:beforeReplace
  • pjax:success
  • pjax:complete
  • pjax:end
  • pjax:start
  • pjax:send

I think it's unexpected behaviour.