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
|
Gallery.generateThumb post
|
||||||
# If no image to open is given, pick image we have scrolled to.
|
# If no image to open is given, pick image we have scrolled to.
|
||||||
if !image and Gallery.fullIDs[post.fullID]
|
if !image and Gallery.fullIDs[post.fullID]
|
||||||
{thumb} = post.file
|
candidate = post.file.thumb.parentNode
|
||||||
if Header.getTopOf(thumb) + thumb.getBoundingClientRect().height >= 0
|
if Header.getTopOf(candidate) + candidate.getBoundingClientRect().height >= 0
|
||||||
image = thumb.parentNode
|
image = candidate
|
||||||
$.add d.body, dialog
|
$.add d.body, dialog
|
||||||
|
|
||||||
nodes.thumbs.scrollTop = 0
|
nodes.thumbs.scrollTop = 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user