summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2014-09-26 12:56:05 +0200
committerczaks <marcin@6irc.net>2014-09-26 12:56:05 +0200
commitba515c5f0519ae89b0876e4291061ecf2ffa6967 (patch)
tree471e703f2b2e4ba4f4882c47fb64d8f9f7adcf27 /js
parentf71cdcaa812353ff7ca8414adec9dbecc1dcf1a6 (diff)
post-hover.js: show a popup preview if a reply is only partially on screen; fixes ctrlcctrlv#84
Diffstat (limited to 'js')
-rw-r--r--js/post-hover.js4
1 files 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 {