From ba515c5f0519ae89b0876e4291061ecf2ffa6967 Mon Sep 17 00:00:00 2001 From: czaks Date: Fri, 26 Sep 2014 12:56:05 +0200 Subject: [PATCH] post-hover.js: show a popup preview if a reply is only partially on screen; fixes ctrlcctrlv#84 --- js/post-hover.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/post-hover.js b/js/post-hover.js index 2808b8e7..0becfb70 100644 --- a/js/post-hover.js +++ b/js/post-hover.js @@ -58,8 +58,8 @@ onready(function(){ // link links to itself or to op; ignore } else if($post.is(':visible') && - $post.offset().top + $post.height() >= $(window).scrollTop() && - $post.offset().top <= $(window).scrollTop() + $(window).height()) { + $post.offset().top >= $(window).scrollTop() && + $post.offset().top + $post.height() <= $(window).scrollTop() + $(window).height()) { // post is in view $post.addClass('highlighted'); } else {