From 9b827c2570f84fde5b59f653a15f8f7414c2de95 Mon Sep 17 00:00:00 2001 From: Stijn Peeters Date: Tue, 4 Feb 2025 18:28:41 +0100 Subject: [PATCH] Fix vertical tooltip position after scrolling --- webtool/static/js/fourcat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webtool/static/js/fourcat.js b/webtool/static/js/fourcat.js index ff1d92d8..2a9c8dc5 100644 --- a/webtool/static/js/fourcat.js +++ b/webtool/static/js/fourcat.js @@ -1079,7 +1079,7 @@ const tooltip = { let top_position = (position.top - height - 5); // if out of viewport, position below element instead - if(top_position < 0) { + if(top_position < window.scrollY) { top_position = position.top + parseFloat($(parent).css('height').replace('px', '')) + 5; } tooltip_container.css('top', top_position + 'px');