MDL-52550 atto: Added preventDefaults for events dragover and dragenter

This commit is contained in:
Panagiotis Nikoloutsopoulos 2016-03-14 02:35:02 +00:00 committed by Cameron Ball
parent 4f33514063
commit c3c3c9f28a
4 changed files with 15 additions and 3 deletions

View File

@ -219,6 +219,10 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
this.editor.delegate('dblclick', this._displayDialogue, 'img', this);
this.editor.delegate('click', this._handleClick, 'img', this);
this.editor.on('drop', this._handleDragDrop, this);
// e.preventDefault needed to stop the default event from clobbering the desired behaviour in some browsers.
this.editor.on('dragover', function(e){e.preventDefault();}, this);
this.editor.on('dragenter', function(e){e.preventDefault();}, this);
},
/**

File diff suppressed because one or more lines are too long

View File

@ -219,6 +219,10 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
this.editor.delegate('dblclick', this._displayDialogue, 'img', this);
this.editor.delegate('click', this._handleClick, 'img', this);
this.editor.on('drop', this._handleDragDrop, this);
// e.preventDefault needed to stop the default event from clobbering the desired behaviour in some browsers.
this.editor.on('dragover', function(e){e.preventDefault();}, this);
this.editor.on('dragenter', function(e){e.preventDefault();}, this);
},
/**

View File

@ -217,6 +217,10 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
this.editor.delegate('dblclick', this._displayDialogue, 'img', this);
this.editor.delegate('click', this._handleClick, 'img', this);
this.editor.on('drop', this._handleDragDrop, this);
// e.preventDefault needed to stop the default event from clobbering the desired behaviour in some browsers.
this.editor.on('dragover', function(e){e.preventDefault();}, this);
this.editor.on('dragenter', function(e){e.preventDefault();}, this);
},
/**