| Index: chrome/browser/resources/file_manager/foreground/js/file_manager.js
|
| diff --git a/chrome/browser/resources/file_manager/foreground/js/file_manager.js b/chrome/browser/resources/file_manager/foreground/js/file_manager.js
|
| index b88f369dec543e90b5049e2bdf617e43292e571a..865682eb64acd796e16989b8098bf1c6eba352f8 100644
|
| --- a/chrome/browser/resources/file_manager/foreground/js/file_manager.js
|
| +++ b/chrome/browser/resources/file_manager/foreground/js/file_manager.js
|
| @@ -809,12 +809,12 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52;
|
|
|
| this.detailViewButton_ =
|
| this.dialogDom_.querySelector('#detail-view');
|
| - this.detailViewButton_.addEventListener('click',
|
| + this.detailViewButton_.addEventListener('activate',
|
| this.onDetailViewButtonClick_.bind(this));
|
|
|
| this.thumbnailViewButton_ =
|
| this.dialogDom_.querySelector('#thumbnail-view');
|
| - this.thumbnailViewButton_.addEventListener('click',
|
| + this.thumbnailViewButton_.addEventListener('activate',
|
| this.onThumbnailViewButtonClick_.bind(this));
|
|
|
| cr.ui.ComboButton.decorate(this.taskItems_);
|
| @@ -2785,6 +2785,11 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52;
|
| * @private
|
| */
|
| FileManager.prototype.onDetailViewButtonClick_ = function(event) {
|
| + // Stop propagate and hide the menu manually, in order to prevent the focus
|
| + // from being back to the button. (cf. http://crbug.com/248479)
|
| + event.stopPropagation();
|
| + this.gearButton_.hideMenu();
|
| +
|
| this.setListType(FileManager.ListType.DETAIL);
|
| this.currentList_.focus();
|
| };
|
| @@ -2794,6 +2799,11 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52;
|
| * @private
|
| */
|
| FileManager.prototype.onThumbnailViewButtonClick_ = function(event) {
|
| + // Stop propagate and hide the menu manually, in order to prevent the focus
|
| + // from being back to the button. (cf. http://crbug.com/248479)
|
| + event.stopPropagation();
|
| + this.gearButton_.hideMenu();
|
| +
|
| this.setListType(FileManager.ListType.THUMBNAIL);
|
| this.currentList_.focus();
|
| };
|
|
|