From c7ad24b259735ac7ec48fdd072da0ccb04978734 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 25 Mar 2019 14:02:55 +0100 Subject: [PATCH] This reverts commit 47b1fe98 --- js/libs/fluidbook/fluidbook.tooltip.js | 17 +++++++++-------- style/fluidbook.less | 5 ++++- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.tooltip.js b/js/libs/fluidbook/fluidbook.tooltip.js index 21d19468..81d2f29b 100644 --- a/js/libs/fluidbook/fluidbook.tooltip.js +++ b/js/libs/fluidbook/fluidbook.tooltip.js @@ -17,7 +17,8 @@ FluidbookTooltip.prototype = { $(window).on('fluidbookzoom', function (e, zoom) { $("#tooltip").transform({scale: 1 / zoom}).css({'marginTop': 20 / zoom, 'marginLeft': -10 / zoom}); }); - + + $(document).on('mouseover', 'a[data-tooltip]', function (e) { $this.updateMousePosition(e); $this.eventTriggered(this); @@ -73,9 +74,9 @@ FluidbookTooltip.prototype = { }, eventTriggered: function (target) { - // if (Modernizr.ftouch && !$(target).is("[data-tooltip-touch]")) { - // return true; - // } + if (fluidbook.input.isUsingTouch() && !$(target).is("[data-tooltip-touch]")) { + return true; + } // When the help is open, we don't want tooltips because they are already displayed under the icons if (this.fluidbook.help.isVisible()) { @@ -98,11 +99,11 @@ FluidbookTooltip.prototype = { $(document).one("touchstart", function () { $this.hideTooltip(); }); + } else { + $(target).one('mouseout', function () { + $this.hideTooltip(); + }); } - $(target).one('mouseout', function () { - $this.hideTooltip(); - }); - this.displayTooltip(text); return false; diff --git a/style/fluidbook.less b/style/fluidbook.less index 179496ea..23e9b6a0 100644 --- a/style/fluidbook.less +++ b/style/fluidbook.less @@ -1213,11 +1213,14 @@ html.ios body.portrait #interface { background-color: transparent; &.displayArea { + -webkit-tap-highlight-color: @links-area-color; background-color: fadeout(@links-color, 99.999%); + &.animating { background-color: @links-area-color; } - &:hover { + + .using-mouse &:hover { opacity: 1 !important; background-color: @links-area-color; } -- 2.39.5