Commit d650e652 authored by Sara Arjona's avatar Sara Arjona
Browse files

Merge branch 'MDL-71751-master' of https://github.com/nguyenphuctien/moodle

parents 2ab697f6 600b049d
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -278,16 +278,15 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
*
* @method _handleDragDrop
* @param {EventFacade} e
* @return {boolean} false if we handled the event, else true.
* @private
*/
_handleDragDrop: function(e) {
if (!e._event || !e._event.dataTransfer) {
// Drop not fully supported in this browser.
return true;
return;
}
return this._handlePasteOrDropHelper(e, e._event.dataTransfer);
this._handlePasteOrDropHelper(e, e._event.dataTransfer);
},
/**
......@@ -333,13 +332,7 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
}
if (didUpload) {
// We handled this.
e.preventDefault();
e.stopPropagation();
return false;
} else {
// Let someone else try to handle it.
return true;
}
},
......
......@@ -174,6 +174,10 @@ 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('drop', function() {
this.pageentercount = 0;
this.hide_drop_target();
}.bind(this));
},
/**
......
Supports Markdown
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