Commit 319beb60 authored by yoshiki@chromium.org's avatar yoshiki@chromium.org

Files.app: Clear the stored destination path on clear the drop target.

This patch prevents the mouse cursor icon from un-changing after the drop target is cleared when next drop target is not available.

BUG=226006
TEST=drag and drop works on Files.app

NOTRY=True
# for chromeos_chrome trybot passes.

Review URL: https://chromiumcodereview.appspot.com/13572006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192807 0039d316-1c4b-4281-b951-d872f2087c98
parent b09f44ae
...@@ -477,8 +477,8 @@ FileTransferController.prototype = { ...@@ -477,8 +477,8 @@ FileTransferController.prototype = {
if (this.dropTarget_ == domElement) if (this.dropTarget_ == domElement)
return; return;
/** @type {string?} */ // Remove the old drop target.
this.destinationPath_ = null; this.clearDropTarget_();
// Add accept class if the domElement can accept the drag. // Add accept class if the domElement can accept the drag.
if (isDirectory && if (isDirectory &&
...@@ -487,9 +487,6 @@ FileTransferController.prototype = { ...@@ -487,9 +487,6 @@ FileTransferController.prototype = {
this.destinationPath_ = destinationPath; this.destinationPath_ = destinationPath;
} }
// Remove the old drag target.
this.clearDropTarget_();
// Set the new drop target. // Set the new drop target.
this.dropTarget_ = domElement; this.dropTarget_ = domElement;
...@@ -514,6 +511,7 @@ FileTransferController.prototype = { ...@@ -514,6 +511,7 @@ FileTransferController.prototype = {
if (this.dropTarget_ && this.dropTarget_.classList.contains('accepts')) if (this.dropTarget_ && this.dropTarget_.classList.contains('accepts'))
this.dropTarget_.classList.remove('accepts'); this.dropTarget_.classList.remove('accepts');
this.dropTarget_ = null; this.dropTarget_ = null;
this.destinationPath_ = null;
if (this.navigateTimer_ !== undefined) { if (this.navigateTimer_ !== undefined) {
clearTimeout(this.navigateTimer_); clearTimeout(this.navigateTimer_);
this.navigateTimer_ = undefined; this.navigateTimer_ = undefined;
......
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