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

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: fix 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 | « no previous file | 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 /** 140 /**
141 * @param {string} type 141 * @param {string} type
142 * @return {boolean} 142 * @return {boolean}
143 * 143 *
144 * @private 144 * @private
145 */ 145 */
146 isUnsupported_: function(type) { 146 isUnsupported_: function(type) {
147 return !this.isImage_(type) && !this.isVideo_(type) && !this.isAudio_(type); 147 return !this.isImage_(type) && !this.isVideo_(type) && !this.isAudio_(type);
148 }, 148 },
149 149
150 ready: function() {
151 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.
152 // Set focus back to innerContent panel if button is clicked by
153 // mouse or tap so that pressing space key after that closes Quick View.
154 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
155 e.stopPropagation();
156 e.preventDefault();
157 this.$.innerContentPanel.focus();
158 }
159 }.bind(this));
160 },
161
150 }); 162 });
OLDNEW
« 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