Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 }); |
| OLD | NEW |