From e92395cceea0aad5e8afe65a8fa999b1f9b1ea00 Mon Sep 17 00:00:00 2001 From: Amateur Audio Dude <168192910+AmateurAudioDude@users.noreply.github.com> Date: Sun, 20 Apr 2025 17:00:07 +1000 Subject: [PATCH] remove mobile tooltip after 5 seconds (previous behaviour) --- web/js/main.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/js/main.js b/web/js/main.js index de3b2f4..db5b5ec 100644 --- a/web/js/main.js +++ b/web/js/main.js @@ -1168,6 +1168,11 @@ function initTooltips(target = null) { // Apply positioning tooltipEl.css({ top: posY, left: posX, opacity: 1 }); + + // For touchscreen devices + if ((/Mobi|Android|iPhone|iPad|iPod|Opera Mini/i.test(navigator.userAgent)) && ('ontouchstart' in window || navigator.maxTouchPoints)) { + setTimeout(() => { $('.tooltiptext').remove(); }, 5000); + } }, 300)); }, function () {