When contracting an image, don't move the post under the header's mousetrap, but beneath it.

This commit is contained in:
Nicolas Stepien 2013-03-25 04:39:01 +01:00
parent 65ef1d0210
commit 5e94c6ec52

View File

@ -16,6 +16,7 @@ Header =
""".replace />\s+</g, '><' # 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