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

Unified Diff: chrome/browser/resources/file_manager/js/file_manager.js

Issue 10412023: Fixing click on thumbnail in the bottom panel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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: chrome/browser/resources/file_manager/js/file_manager.js
diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js
index 0f428269b42d068ca454bb8be6b803fe5894a81f..58b27fa45f1ee9d2d654ed843860f6def3d232b4 100644
--- a/chrome/browser/resources/file_manager/js/file_manager.js
+++ b/chrome/browser/resources/file_manager/js/file_manager.js
@@ -2139,6 +2139,9 @@ FileManager.prototype = {
showThumbnails();
}
+ var thumbnailClickHandler =
+ this.dispatchDefaultTask_.bind(this, selection);
+
for (var i = 0; i < selection.indexes.length; i++) {
var entry = this.directoryModel_.getFileList().item(selection.indexes[i]);
if (!entry)
@@ -2163,6 +2166,7 @@ FileManager.prototype = {
}
var thumbnail = this.renderThumbnailBox_(entry, true,
onFirstThumbnailLoaded);
+ zoomed.addEventListener('click', thumbnailClickHandler);
} else {
var thumbnail = this.renderThumbnailBox_(entry, true,
onThumbnailLoaded);
@@ -2170,8 +2174,7 @@ FileManager.prototype = {
thumbnailCount++;
box.appendChild(thumbnail);
box.style.zIndex = MAX_PREVIEW_THUMBAIL_COUNT + 1 - i;
- box.addEventListener('click',
- this.dispatchDefaultTask_.bind(this, selection));
+ box.addEventListener('click', thumbnailClickHandler);
thumbnails.push(box);
}
« 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