| Index: ui/file_manager/file_manager/foreground/js/ui/file_grid.js
|
| diff --git a/ui/file_manager/file_manager/foreground/js/ui/file_grid.js b/ui/file_manager/file_manager/foreground/js/ui/file_grid.js
|
| index cb0b9e2b4244eed3058c46dc6817e58b6a9c820f..135af6f1f947014c407110de3cc71db669e43122 100644
|
| --- a/ui/file_manager/file_manager/foreground/js/ui/file_grid.js
|
| +++ b/ui/file_manager/file_manager/foreground/js/ui/file_grid.js
|
| @@ -305,7 +305,7 @@ FileGrid.prototype.getFirstItemInRow = function(row) {
|
| FileGrid.prototype.scrollIndexIntoView = function(index) {
|
| var dataModel = this.dataModel;
|
| if (!dataModel || index < 0 || index >= dataModel.length)
|
| - return false;
|
| + return;
|
|
|
| var itemHeight = index < this.dataModel.getFolderCount() ?
|
| this.getFolderItemHeight_() : this.getFileItemHeight_();
|
| @@ -322,27 +322,24 @@ FileGrid.prototype.scrollIndexIntoView = function(index) {
|
| // Function to adjust the tops of viewport and row.
|
| var scrollToAdjustTop = function() {
|
| self.scrollTop = top;
|
| - return true;
|
| };
|
| // Function to adjust the bottoms of viewport and row.
|
| var scrollToAdjustBottom = function() {
|
| self.scrollTop = top + itemHeight - availableHeight;
|
| - return true;
|
| };
|
|
|
| // Check if the entire of given indexed row can be shown in the viewport.
|
| if (itemHeight <= availableHeight) {
|
| if (top < scrollTop)
|
| - return scrollToAdjustTop();
|
| - if (scrollTop + availableHeight < top + itemHeight)
|
| - return scrollToAdjustBottom();
|
| + scrollToAdjustTop();
|
| + else if (scrollTop + availableHeight < top + itemHeight)
|
| + scrollToAdjustBottom();
|
| } else {
|
| if (scrollTop < top)
|
| - return scrollToAdjustTop();
|
| - if (top + itemHeight < scrollTop + availableHeight)
|
| - return scrollToAdjustBottom();
|
| + scrollToAdjustTop();
|
| + else if (top + itemHeight < scrollTop + availableHeight)
|
| + scrollToAdjustBottom();
|
| }
|
| - return false;
|
| };
|
|
|
| /**
|
|
|