Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

md-tabs can't be used for page navigation #6676

@gmoothart

Description

@gmoothart

The tab component does not work well as top-navigation (header links, with no md-tab-body). The root of the problem is that md-tabs fires a synthetic click event on init, which causes an infinite redirect loop if clicking on a tab causes a page navigation (which re-initializes the tabs which causes a click which triggers a page navigation...).

tab init triggers the select() function:

ctrl.tabs[ ctrl.selectedIndex ] && ctrl.tabs[ ctrl.selectedIndex ].scope.select();

select() triggers a click:

ctrl.tabs[ index ].element.triggerHandler('click');

Metadata

Metadata

Assignees

Labels

P3: importantImportant issues that really should be fixed when possible.g3: reportedThe issue was reported by an internal or external product team.has: Pull RequestA PR has been created to address this issue

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions