diff --git a/lib/form/dndupload.js b/lib/form/dndupload.js index 8c612eb661e..29d4b91cb7d 100644 --- a/lib/form/dndupload.js +++ b/lib/form/dndupload.js @@ -176,10 +176,13 @@ M.form_dndupload.init = function(Y, options) { init_page_events: function() { this.Y.on('dragenter', this.drag_enter_page, 'body', this); this.Y.on('dragleave', this.drag_leave_page, 'body', this); + this.Y.on('dragover', function(e) { + e.preventDefault(); + }, 'body', this); this.Y.on('drop', function() { this.pageentercount = 0; this.hide_drop_target(); - }.bind(this)); + }, 'body', this); }, /**