Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

throw when a transition starts while another is still in progress #204

Closed
mjackson opened this issue Aug 14, 2014 · 6 comments
Closed

throw when a transition starts while another is still in progress #204

mjackson opened this issue Aug 14, 2014 · 6 comments
Labels

Comments

@mjackson
Copy link
Member

Using the high-level transitionTo, replaceWith and goBack methods are a footgun when used inside willTransitionTo, so we should warn users if they try and kick off a transition while another is still in progress. The easiest way to do this is probably inside Routes#dispatch. Just have some flag that indicates whether or not a transition is currently in progress, and throw if a new one comes in.

See #198 (comment)

@machty
Copy link

machty commented Aug 24, 2014

Why not do the Ember thing and treat this situation as an implicit abort of the first transition attempt?

@ryanflorence
Copy link
Member

I agree with @machty. If a transition hook returns a slow promise (which we wait for) the user could have clicked another link. I think we should allow that, and just abort the current transition.

@mjackson
Copy link
Member Author

👍 Yeah, that totally makes sense.

@ryanflorence
Copy link
Member

@mjackson is this a part of your big refactor?

@mjackson
Copy link
Member Author

I think we can include this in the work I'm doing now.

@mjackson
Copy link
Member Author

This was fixed by #480

@lock lock bot locked as resolved and limited conversation to collaborators Jan 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants