diff --git a/src/Images/Gallery.coffee b/src/Images/Gallery.coffee index 815f6e456..d4ea8c4b7 100644 --- a/src/Images/Gallery.coffee +++ b/src/Images/Gallery.coffee @@ -144,7 +144,7 @@ Gallery = newID = +thumb.dataset.id # Highlight, center selected thumbnail - $.rmClass el, 'gal-highlight' if el = $ '.gal-highlight', nodes.thumbs + $.rmClass el, 'gal-highlight' if el = Gallery.images[oldID] $.addClass thumb, 'gal-highlight' nodes.thumbs.scrollTop = thumb.offsetTop + thumb.offsetHeight/2 - nodes.thumbs.clientHeight/2