API: beforeSend does not cancel request #3660

Closed
vkruoso opened this Issue Feb 6, 2016 · 5 comments

Projects

None yet

3 participants

@vkruoso
vkruoso commented Feb 6, 2016

In the "Cancelling Requests" section of the API usage docs I can see that if false is returned from the beforeSend callback the request should be cancelled. This is not the case. The example itself does issue the request, as it is easily viewed in the console.

Is there any other way of cancelling the request?

@yaowenz
yaowenz commented Feb 12, 2016

I've encouter the same issue. Seems $(this).state('flash text', 'Requires Login!'); will block sending, but i think it's not the right way. I think state management is still under developing.

@jlukic
Member
jlukic commented Feb 13, 2016

Can you produce the minimal test case required to reproduce this.

@jlukic
Member
jlukic commented Feb 13, 2016

I'm fairly certain this is a bug that was introduced in a recent patch.. No good.

@jlukic jlukic added this to the 2.1.9 milestone Feb 13, 2016
@jlukic jlukic removed the Needs Test Case label Feb 15, 2016
@jlukic
Member
jlukic commented Feb 15, 2016

This was probably introduced when API request was refactored into multiple functions. get settings was returning {} instead of false causing the beforeSend checks not to work.

@jlukic jlukic closed this Feb 15, 2016
@vkruoso
vkruoso commented Feb 22, 2016

@jlukic Sorry about not updating the issue with more information. As I can see the problem is now fixed! Thanks a lot.

@jlukic jlukic modified the milestone: 2.1.9, 2.2 May 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment