fix bug in opening gallery to current image when image was expanded
This commit is contained in:
parent
432f1c4b36
commit
0fa82353f4
@ -75,9 +75,9 @@ Gallery =
|
||||
Gallery.generateThumb post
|
||||
# If no image to open is given, pick image we have scrolled to.
|
||||
if !image and Gallery.fullIDs[post.fullID]
|
||||
{thumb} = post.file
|
||||
if Header.getTopOf(thumb) + thumb.getBoundingClientRect().height >= 0
|
||||
image = thumb.parentNode
|
||||
candidate = post.file.thumb.parentNode
|
||||
if Header.getTopOf(candidate) + candidate.getBoundingClientRect().height >= 0
|
||||
image = candidate
|
||||
$.add d.body, dialog
|
||||
|
||||
nodes.thumbs.scrollTop = 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user