Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/components/Navigator/NavigatorCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,8 @@ export default {
* that points to another technology.
*/
handleNavigationChange(uid) {
// force-close the navigator on mobile
this.$emit('close');
// if the path is outside of this technology tree, dont store the uid
if (this.childrenMap[uid].path.startsWith(this.technologyPath)) {
this.setActiveUID(uid);
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/components/Navigator/NavigatorCard.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1698,6 +1698,8 @@ describe('NavigatorCard', () => {
expect(getChildPositionInScroller).toHaveBeenCalledTimes(2);
expect(RecycleScrollerStub.methods.scrollToItem).toHaveBeenCalledTimes(1);
expect(RecycleScrollerStub.methods.scrollToItem).toHaveBeenLastCalledWith(2); // 3-rd item
// assert close event was emitted
expect(wrapper.emitted('close')).toHaveLength(1);
// now simulate the router change
wrapper.setProps({ activePath: [root0.path, root0Child1.path] });
await flushPromises();
Expand Down