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

Unified Diff: chrome/browser/resources/file_manager/foreground/js/file_manager.js

Issue 128023002: [Files.app] Use 'activate' event on the view-change menuitems instead of 'click' event (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 11 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 | chrome/test/data/extensions/api_test/file_manager_browsertest/test_cases.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
};
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/file_manager_browsertest/test_cases.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698