-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
transition.abort() does not work for query param only transitions #18568
Comments
I'm seeing a similar issue. Edit: Think mine is slightly different and related to many other issues. Opened it as a separate issue: #18577 |
@normanhaze what version of Ember are you seeing this in? And are you able to send in a reproduction to make it easier to track this down? |
Hi @acorncom - I'm using 3.13, but I've created a demo app using 3.15 and the issue is still there. Take a look: https://github.com/normanhaze/transition-issue-demo A 'routeWillChange' event is set in the component's constructor, which triggers when the queryParams change (when you click the button). The first transition has the correct 'from' and 'to' query params, and appears to be aborted, and the event triggers again with a new transition. The 'from' and 'to' query params are both for the current route. This is not aborted due to the check for the 'isAborted' property. However, the query params change to the original target anyway. |
Hi guys, this issue should have |
thanks @normanhaze / @omairvaiyani, updated |
I'm seeing this issue again after upgrading to ember 3.26.1, at least when the transition is triggered by the LinkTo component. |
When calling transition.abort() on a transition which only changes the query params, the transition goes ahead anyway. I am using the ‘routeWillChange’ event in the router service to intercept the transition. transition.abort() is called but does not prevent the params change.
Perhaps a slightly different issue, but transition.abort() also triggers the ‘routeWIllChange’ event again, with some confusing properties. ‘isAborted’ is true, ‘isCausedByAbortingTransition’ is false, and the ‘to’ and ‘from’ objects both point to the original ‘from’ query params, not the new query params. If nothing else, surely an aborted transition shouldn’t be triggering the ‘routeWillChange’ event?
The text was updated successfully, but these errors were encountered: