Commit d0f90b00 by Rashid Khan

Closes #538. Closes #722

parent e832519d
...@@ -712,12 +712,16 @@ angular.module('$strap.directives').directive('bsTabs', [ ...@@ -712,12 +712,16 @@ angular.module('$strap.directives').directive('bsTabs', [
scope.$watch(iAttrs.ngModel, function (newValue, oldValue) { scope.$watch(iAttrs.ngModel, function (newValue, oldValue) {
if (angular.isUndefined(newValue)) if (angular.isUndefined(newValue))
return; return;
console.log(oldValue +" -> "+ newValue);
activeTab = newValue; activeTab = newValue;
setTimeout(function () { setTimeout(function () {
// Check if we're still on the same tab before making the switch
if(activeTab === newValue) {
var $next = $($tabs[0].querySelectorAll('li')[newValue * 1]); var $next = $($tabs[0].querySelectorAll('li')[newValue * 1]);
if (!$next.hasClass('active')) { if (!$next.hasClass('active')) {
$next.children('a').tab('show'); $next.children('a').tab('show');
} }
}
}); });
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment