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

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

Issue 1089683003: Files.app: Prevent dragging files while renaming is in progress. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: ui/file_manager/file_manager/foreground/js/file_transfer_controller.js
diff --git a/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js b/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js
index 8623009e34ee1bb4fec290f3e8c3cd98bc627fe8..2eeb6a7e2d89c3c999d5699baf9595f0a27dee79 100644
--- a/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js
+++ b/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js
@@ -700,6 +700,13 @@ FileTransferController.prototype.renderThumbnail_ = function() {
* @private
*/
FileTransferController.prototype.onDragStart_ = function(list, event) {
+ // If renaming is in progress, drag operation should be used for selecting
+ // substring of the text. So we don't drag files here.
+ if (this.listContainer_.renameInput.currentEntry) {
+ event.preventDefault();
+ return;
+ }
+
// Check if a drag selection should be initiated or not.
if (list.shouldStartDragSelection(event)) {
event.preventDefault();
« 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