emberjs / emberjs/ember.js

LinkView "active" class not always applied after retried transitions

Open
#10,557 20 comments 0 reactions 0 assignees View on GitHub
bug Needs Reproduction Routing
Dominant language
TypeScript
Stars
22.6k
Forks
4.2k
Avg merge
3d 12h
Merged PRs (30d)
15

Description

I spotted an odd issue with the login workflow of a new app I started working on last week. After a user completed our login process, the navigation link for the route they came back to did not have an 'active' class applied.

I've reproduced the issue in a jsbin here: http://emberjs.jsbin.com/livisemixu/1/

To see the behavior, click on the "Secret" link, then the "Log in" link that appears in the route. There will be no active class when the transition is subsequently resumed. If you click back to the index and revisit the "secret" route, the class is then applied correctly.

Interestingly, if the model hook of the retried transition returns a promise that is not resolved immediately, the issue does not occur.

I've reproduced this both in 1.11.0-beta.4 and on canary, and will see if I can put together a failing test.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.