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

Unified Diff: ui/file_manager/file_manager/foreground/js/quick_view_controller.js

Issue 2285533002: Re-focus file list when quick view is closed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert irrelevent file. 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/file_manager/foreground/js/quick_view_controller.js
diff --git a/ui/file_manager/file_manager/foreground/js/quick_view_controller.js b/ui/file_manager/file_manager/foreground/js/quick_view_controller.js
index d3d655a602afd45a3251d323d707ddb67dd30d27..aef17cdee1cec90d58fdb2902f48f2d13c3ee9fa 100644
--- a/ui/file_manager/file_manager/foreground/js/quick_view_controller.js
+++ b/ui/file_manager/file_manager/foreground/js/quick_view_controller.js
@@ -75,6 +75,9 @@ function QuickViewController(
listContainer.element.addEventListener(
'keydown', this.onKeyDownToOpen_.bind(this));
quickView.addEventListener('keydown', this.onQuickViewKeyDown_.bind(this));
+ quickView.addEventListener('iron-overlay-closed', function() {
+ this.listContainer_.focus();
+ }.bind(this));
quickView.onOpenInNewButtonTap = this.onOpenInNewButtonTap_.bind(this);
var toolTip = this.quickView_.$$('files-tooltip');
@@ -120,7 +123,6 @@ QuickViewController.prototype.onQuickViewKeyDown_ = function(event) {
case 'Escape':
event.preventDefault();
this.quickView_.close();
- this.listContainer_.focus();
break;
case 'ArrowRight':
var index = this.fileListSelectionModel_.selectedIndex + 1;
« 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