Only disable tooltips themselves, not the entire provider

This commit is contained in:
Joseph Schorr 2015-04-21 15:06:12 -04:00
parent dfc2b562e7
commit 765492e882
2 changed files with 14 additions and 3 deletions

View file

@ -1077,9 +1077,11 @@
left: 2px;
}
@media (min-width: 768px) {
.co-checkable-item:hover:after {
visibility: visible;
}
}
.co-checkable-item.checked:after, .co-checkable-menu-state.all:after, .co-checkable-menu-state.some:after {
visibility: visible;

View file

@ -56,7 +56,16 @@ quayApp.config(['$tooltipProvider', function ($tooltipProvider) {
// decorate the tooltip getter
$tooltipProvider.$get[$tooltipProvider.$get.length - 1] = function($window) {
if ('ontouchstart' in $window) {
return function() {};
var existing = tooltipFactory.apply(this, arguments);
return function(element) {
// Note: We only disable bs-tooltip's themselves. $tooltip is used for other things
// (such as the datepicker), so we need to be specific when canceling it.
if (element.attr('bs-tooltip') == null) {
return existing.apply(this, arguments);
} else {
return null;
}
};
}
return tooltipFactory.apply(this, arguments);