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

Unified Diff: ui/file_manager/file_manager/foreground/js/ui/file_table.js

Issue 964393002: Dispatch change events when file changes have happened on Drive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add null check. Created 5 years, 10 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/js/main_window_component.js ('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/js/ui/file_table.js
diff --git a/ui/file_manager/file_manager/foreground/js/ui/file_table.js b/ui/file_manager/file_manager/foreground/js/ui/file_table.js
index 7d62b53bb11136a65ffa37ee0587f40689b9459d..57b7f050a7d169628c6b022431340c6846ce5a63 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/file_table.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/file_table.js
@@ -494,9 +494,12 @@ FileTable.prototype.shouldStartDragSelection_ = function(event) {
return true;
// Check if the point is on the column contents or not.
- var item = this.list.getListItemByIndex(itemIndex);
switch (this.columnModel.columns_[hitColumn.index].id) {
case 'name':
+ var item = this.list.getListItemByIndex(itemIndex);
yawano 2015/03/03 03:15:54 While it's difficult to make this item variable nu
+ if (!item)
+ return false;
+
var spanElement = item.querySelector('.filename-label span');
var spanRect = spanElement.getBoundingClientRect();
// The this.list.cachedBounds_ object is set by
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/main_window_component.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698