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

Unified Diff: ui/file_manager/file_manager/foreground/elements/files_quick_view.js

Issue 2305563002: Quick View: avoid to lose focus when metadata button is clicked. (Closed)
Patch Set: fix 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/elements/files_quick_view.js
diff --git a/ui/file_manager/file_manager/foreground/elements/files_quick_view.js b/ui/file_manager/file_manager/foreground/elements/files_quick_view.js
index 3fc8e6f922c1c42bfcb20de8f5b0ca6e65d67837..c7bab2f78610f12c7e59b3ea3a68b4750898456a 100644
--- a/ui/file_manager/file_manager/foreground/elements/files_quick_view.js
+++ b/ui/file_manager/file_manager/foreground/elements/files_quick_view.js
@@ -147,4 +147,16 @@ var FilesQuickView = Polymer({
return !this.isImage_(type) && !this.isVideo_(type) && !this.isAudio_(type);
},
+ ready: function() {
+ this.$['metadata-button'].addEventListener('click', function(e) {
fukino 2016/09/01 09:00:04 I think adding "on-tap=" attribute for the metadat
oka 2016/09/01 09:35:47 Done.
+ // Set focus back to innerContent panel if button is clicked by
+ // mouse or tap so that pressing space key after that closes Quick View.
+ if (e.screenX > 0 || e.screenY > 0) { // clicked by mouse or tap.
fukino 2016/09/01 09:00:04 Can't we always focus the content panel on clicks?
oka 2016/09/01 09:35:47 Done. I thought focus should be stick to the butto
+ e.stopPropagation();
+ e.preventDefault();
+ this.$.innerContentPanel.focus();
+ }
+ }.bind(this));
+ },
+
});
« 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