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

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

Issue 10854117: Files app should not reload when images are dragged into it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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_manager.js
diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js
index 9e1e42ca341cb67d402581930e969cf058e4d951..1413cb56610a263938eb4a3f031a04ca000602d9 100644
--- a/chrome/browser/resources/file_manager/js/file_manager.js
+++ b/chrome/browser/resources/file_manager/js/file_manager.js
@@ -562,6 +562,10 @@ FileManager.prototype = {
* One-time initialization of various DOM nodes.
*/
FileManager.prototype.initDom_ = function() {
+ this.dialogDom_.addEventListener('drop', function(e) {
dgozman 2012/08/13 13:00:30 Do we have a separate drop listener to handle file
SeRya 2012/08/13 13:21:37 Sure we do. It placed into FileTransferController.
+ // Prevent opening an URL by dropping it onto the page.
+ e.preventDefault();
+ });
// Cache nodes we'll be manipulating.
this.previewThumbnails_ =
this.dialogDom_.querySelector('.preview-thumbnails');
« 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