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

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

Issue 2265433002: Quick View: Stopped to show orange border when no-preview icon is clicked. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit 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 | « ui/file_manager/file_manager/foreground/elements/files_quick_view.html ('k') | 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 098912da64be8e39d2c6ef66e1e31daf0199b103..effb083064cfec1bf1e1ef5c35bf9acffabbac0b 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
@@ -75,23 +75,21 @@ var FilesQuickView = Polymer({
onOpenInNewButtonTap: function(event) {},
/**
- * @param {!Event} event
+ * Close Quick View unless the clicked target or its ancestor contains
+ * 'no-close-on-click' class.
*
- * @private
- */
- onCloseButtonTap_: function(event) {
- this.close();
- },
-
- /**
* @param {!Event} event tap event.
*
* @private
*/
onContentPanelTap_: function(event) {
var target = event.detail.sourceEvent.target;
- if (target.classList.contains('close-on-click'))
- this.close();
+ while (target) {
+ if (target.classList.contains('no-close-on-click'))
+ return;
+ target = target.parentElement;
+ }
+ this.close();
},
/**
@@ -115,17 +113,6 @@ var FilesQuickView = Polymer({
},
/**
- * @param {string} contentUrl
- * @param {string} type
- * @return {string}
- *
- * @private
- */
- videoUrl_: function(contentUrl, type) {
- return this.isVideo_(type) ? contentUrl : "";
- },
-
- /**
* @param {string} type
* @return {boolean}
*
« 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