Chromium Code Reviews| 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..cd96aab6f52372df0e5aa444d8db56698f883be2 100644 |
| --- a/ui/file_manager/gallery/js/slide_mode.js |
| +++ b/ui/file_manager/gallery/js/slide_mode.js |
| @@ -927,6 +927,9 @@ SlideMode.prototype.getNextSelectedIndex_ = function(direction) { |
| * @param {string} keyID Key of the KeyboardEvent. |
| */ |
| SlideMode.prototype.advanceWithKeyboard = function(keyID) { |
| + if (this.selectionModel_.selectedIndex === -1) |
|
fukino
2016/08/10 04:39:46
What we want to do is "If there is no item, do not
harukam1
2016/08/10 05:04:11
Acknowledged.
|
| + return; |
| + |
| var prev = (keyID === 'ArrowUp' || |
| keyID === 'ArrowLeft' || |
| keyID === 'MediaTrackPrevious'); |