Skip to content

Commit

Permalink
Closes #538. Closes #722
Browse files Browse the repository at this point in the history
  • Loading branch information
Rashid Khan committed Dec 3, 2013
1 parent e832519 commit d0f90b0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/vendor/angular/angular-strap.js
Original file line number Diff line number Diff line change
Expand Up @@ -712,11 +712,15 @@ angular.module('$strap.directives').directive('bsTabs', [
scope.$watch(iAttrs.ngModel, function (newValue, oldValue) {
if (angular.isUndefined(newValue))
return;
console.log(oldValue +" -> "+ newValue);
activeTab = newValue;
setTimeout(function () {
var $next = $($tabs[0].querySelectorAll('li')[newValue * 1]);
if (!$next.hasClass('active')) {
$next.children('a').tab('show');
// Check if we're still on the same tab before making the switch
if(activeTab === newValue) {
var $next = $($tabs[0].querySelectorAll('li')[newValue * 1]);
if (!$next.hasClass('active')) {
$next.children('a').tab('show');
}
}
});
});
Expand Down

1 comment on commit d0f90b0

@michalre
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is a typo: It closes 583, not 538.

Please sign in to comment.