Skip to content

Commit

Permalink
Fix vertical tooltip position after scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
stijn-uva committed Feb 4, 2025
1 parent dd2ab72 commit 9b827c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webtool/static/js/fourcat.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 9b827c2

Please sign in to comment.