Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Unified Diff: ui/file_manager/gallery/js/slide_mode.js

Issue 2229733002: Fix index changed when no image in the directory in gallery (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/gallery/js/slide_mode.js
diff --git a/ui/file_manager/gallery/js/slide_mode.js b/ui/file_manager/gallery/js/slide_mode.js
index 54ccfc190836c795c1f1bde488583cff4d7f9a5f..ca53ea15b702978d678a5f0d161586842f103c48 100644
--- a/ui/file_manager/gallery/js/slide_mode.js
+++ b/ui/file_manager/gallery/js/slide_mode.js
@@ -918,6 +918,8 @@ SlideMode.prototype.getNextSelectedIndex_ = function(direction) {
this.savedSelection_.length);
return this.savedSelection_[pos];
} else {
+ if(this.getSelectedIndex() == -1)
+ return -1;
harukam1 2016/08/09 07:18:57 "slideshowButton" icon shows because selectedIndex
fukino 2016/08/09 07:49:18 It's weird that selectionModel_.selectedIndexes.le
harukam1 2016/08/10 04:34:47 We have decided to modify advanceWithKeyboard meth
return advance(this.getSelectedIndex(), this.getItemCount_());
}
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698