Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Bug 943813 - [Gallery] scrollToShowThumbnail not work
Browse files Browse the repository at this point in the history
  • Loading branch information
cctuan committed Dec 20, 2013
1 parent 3508d5c commit ee5560a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/gallery/js/gallery.js
Expand Up @@ -579,7 +579,9 @@ function fileCreated(fileinfo) {

// Make the thumbnail for image n visible
function scrollToShowThumbnail(n) {
var selector = 'li[data-index="' + n + '"]';
if (!files[n])
return;
var selector = 'li[data-filename="' + files[n].name + '"]';
var thumbnail = thumbnails.querySelector(selector);
if (thumbnail) {
var screenTop = thumbnails.scrollTop;
Expand Down

0 comments on commit ee5560a

Please sign in to comment.