From 5e94c6ec5274e78f9b5294c7cb5588a84bc46bcc Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Mon, 25 Mar 2013 04:39:01 +0100 Subject: [PATCH] When contracting an image, don't move the post under the header's mousetrap, but beneath it. --- src/features.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/features.coffee b/src/features.coffee index 7253a0699..a1c8b8632 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -16,6 +16,7 @@ Header = """.replace />\s+<' # get rid of spaces between elements @bar = $ '#header-bar', headerEl + @toggle = $ '#toggle-header-bar', @bar @setBarVisibility Conf['Header auto-hide'] $.sync 'Header auto-hide', @setBarVisibility @@ -3157,7 +3158,7 @@ ImageExpand = # Scroll back to the thumbnail when contracting the image # to avoid being left miles away from the relevant post. postRect = post.nodes.root.getBoundingClientRect() - headRect = Header.bar.getBoundingClientRect() + headRect = Header.toggle.getBoundingClientRect() top = postRect.top - headRect.top - headRect.height - 2 root = if $.engine is 'webkit' d.body