Commit 60a533c0 authored by fukino's avatar fukino Committed by Commit bot

Handle the case when the last selection is not set yet.

When a user starts to drag an item before they haven't selected any item yet,
FileTable.lastSelection_ can be undefined and this ends up an incorrect drag image.
The existence of lastSelection_ should be checked.

BUG=409514
TEST=manually

Review URL: https://codereview.chromium.org/532453002

Cr-Commit-Position: refs/heads/master@{#292845}
parent 0c647499
......@@ -395,7 +395,7 @@ FileTable.prototype.shouldStartDragSelection_ = function(event) {
// If the pointed item is already selected, it should not start the drag
// selection.
if (this.lastSelection_.indexOf(itemIndex) !== -1)
if (this.lastSelection_ && this.lastSelection_.indexOf(itemIndex) !== -1)
return false;
// If the horizontal value is not hit to column, it should start the drag
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment