diff --git a/public/js/extensions.js b/public/js/extensions.js index 98e64ca2..8e3340fe 100644 --- a/public/js/extensions.js +++ b/public/js/extensions.js @@ -31,3 +31,13 @@ GetUriParam = function(key) } } }; + +IsTouchInputDevice = function() +{ + if (("ontouchstart" in window) || window.DocumentTouch && document instanceof DocumentTouch) + { + return true; + } + + return false; +} diff --git a/public/js/grocy.js b/public/js/grocy.js index 7abe16fd..24b8fd29 100644 --- a/public/js/grocy.js +++ b/public/js/grocy.js @@ -91,6 +91,14 @@ window.FontAwesomeConfig = { searchPseudoElements: true } +// Don't show tooltips on touch input devices +if (IsTouchInputDevice()) +{ + var css = document.createElement("style"); + css.innerHTML = ".tooltip { display: none; }"; + document.body.appendChild(css); +} + Grocy.Api = { }; Grocy.Api.Get = function(apiFunction, success, error) {