Commit ed8cdb39 authored by serya@chromium.org's avatar serya@chromium.org

Files app should not reload when images are dragged into it.

BUG=137981
TEST=Test that dropping image from third party page has no effect. Test that files from other file manager windows do drop.


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151262 0039d316-1c4b-4281-b951-d872f2087c98
parent 107c9cc8
...@@ -562,6 +562,10 @@ FileManager.prototype = { ...@@ -562,6 +562,10 @@ FileManager.prototype = {
* One-time initialization of various DOM nodes. * One-time initialization of various DOM nodes.
*/ */
FileManager.prototype.initDom_ = function() { FileManager.prototype.initDom_ = function() {
this.dialogDom_.addEventListener('drop', function(e) {
// Prevent opening an URL by dropping it onto the page.
e.preventDefault();
});
// Cache nodes we'll be manipulating. // Cache nodes we'll be manipulating.
this.previewThumbnails_ = this.previewThumbnails_ =
this.dialogDom_.querySelector('.preview-thumbnails'); this.dialogDom_.querySelector('.preview-thumbnails');
......
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