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

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

Issue 13572006: Files.app: Clear the stored destination path on clear the drop target. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comment Created 7 years, 8 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_transfer_controller.js
diff --git a/chrome/browser/resources/file_manager/js/file_transfer_controller.js b/chrome/browser/resources/file_manager/js/file_transfer_controller.js
index c3e96f4ff29cdec5a85bebd36363487568489c28..34d36b7f935bb3b64527a9e0f3166db3495350d8 100644
--- a/chrome/browser/resources/file_manager/js/file_transfer_controller.js
+++ b/chrome/browser/resources/file_manager/js/file_transfer_controller.js
@@ -477,8 +477,8 @@ FileTransferController.prototype = {
if (this.dropTarget_ == domElement)
return;
- /** @type {string?} */
- this.destinationPath_ = null;
+ // Remove the old drop target.
+ this.clearDropTarget_();
// Add accept class if the domElement can accept the drag.
if (isDirectory &&
@@ -487,9 +487,6 @@ FileTransferController.prototype = {
this.destinationPath_ = destinationPath;
}
- // Remove the old drag target.
- this.clearDropTarget_();
-
// Set the new drop target.
this.dropTarget_ = domElement;
@@ -514,6 +511,7 @@ FileTransferController.prototype = {
if (this.dropTarget_ && this.dropTarget_.classList.contains('accepts'))
this.dropTarget_.classList.remove('accepts');
this.dropTarget_ = null;
+ this.destinationPath_ = null;
if (this.navigateTimer_ !== undefined) {
clearTimeout(this.navigateTimer_);
this.navigateTimer_ = undefined;
« 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