From 765492e882c3df57649ebbd83f3c97c518b5e598 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Tue, 21 Apr 2015 15:06:12 -0400 Subject: [PATCH] Only disable tooltips themselves, not the entire provider --- static/css/core-ui.css | 6 ++++-- static/js/app.js | 11 ++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/static/css/core-ui.css b/static/css/core-ui.css index 3581009b3..499cfbef7 100644 --- a/static/css/core-ui.css +++ b/static/css/core-ui.css @@ -1077,8 +1077,10 @@ left: 2px; } -.co-checkable-item:hover:after { - visibility: visible; +@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 { diff --git a/static/js/app.js b/static/js/app.js index b99a73ef8..47d38eecc 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -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);