Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
fix(tabs): factors me-active attribute into selection logic to prev…
Browse files Browse the repository at this point in the history
…ent unnecessary `md-on-select` calls

Closes #868.
  • Loading branch information
robertmesserle committed Jan 12, 2015
1 parent 9091741 commit 6a087a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/tabs/js/tabsController.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ function MdTabsController($scope, $element, $mdUtil, $timeout) {

// Select the new tab if we don't have a selectedIndex, or if the
// selectedIndex we've been waiting for is this tab
if ($scope.selectedIndex === -1 || !angular.isNumber($scope.selectedIndex) ||
$scope.selectedIndex === self.indexOf(tab)) {
if (!angular.isDefined(tab.element.attr('md-active')) && ($scope.selectedIndex === -1 || !angular.isNumber($scope.selectedIndex) ||
$scope.selectedIndex === self.indexOf(tab))) {
tab.onAdd(self.contentArea, false);
self.select(tab);
} else {
Expand Down

0 comments on commit 6a087a0

Please sign in to comment.