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

Side by Side 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: Address comments. Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « ui/file_manager/file_manager/foreground/elements/files_quick_view.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var FilesQuickView = Polymer({ 5 var FilesQuickView = Polymer({
6 is: 'files-quick-view', 6 is: 'files-quick-view',
7 7
8 properties: { 8 properties: {
9 // File media type, e.g. image, video. 9 // File media type, e.g. image, video.
10 type: String, 10 type: String,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 }, 72 },
73 73
74 /** 74 /**
75 * Client should assign the function to open the file. 75 * Client should assign the function to open the file.
76 * 76 *
77 * @param {!Event} event 77 * @param {!Event} event
78 */ 78 */
79 onOpenInNewButtonTap: function(event) {}, 79 onOpenInNewButtonTap: function(event) {},
80 80
81 /** 81 /**
82 * @param {!Event} event tap event.
83 *
84 * @private
85 */
86 onMetadataButtonTap_: function(event) {
87 // Set focus back to innerContent panel so that pressing space key next
88 // closes Quick View.
89 this.$.innerContentPanel.focus();
90 },
91
92 /**
82 * Close Quick View unless the clicked target or its ancestor contains 93 * Close Quick View unless the clicked target or its ancestor contains
83 * 'no-close-on-click' class. 94 * 'no-close-on-click' class.
84 * 95 *
85 * @param {!Event} event tap event. 96 * @param {!Event} event tap event.
86 * 97 *
87 * @private 98 * @private
88 */ 99 */
89 onContentPanelTap_: function(event) { 100 onContentPanelTap_: function(event) {
90 var target = event.detail.sourceEvent.target; 101 var target = event.detail.sourceEvent.target;
91 while (target) { 102 while (target) {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 * @param {string} type 152 * @param {string} type
142 * @return {boolean} 153 * @return {boolean}
143 * 154 *
144 * @private 155 * @private
145 */ 156 */
146 isUnsupported_: function(type) { 157 isUnsupported_: function(type) {
147 return !this.isImage_(type) && !this.isVideo_(type) && !this.isAudio_(type); 158 return !this.isImage_(type) && !this.isVideo_(type) && !this.isAudio_(type);
148 }, 159 },
149 160
150 }); 161 });
OLDNEW
« no previous file with comments | « ui/file_manager/file_manager/foreground/elements/files_quick_view.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698