TinyMCE: Propagate the dragover event outside the editor so drag-and-drop uploads can catch it.

props kovshenin.
see #19845.

Built from https://develop.svn.wordpress.org/trunk@27372


git-svn-id: http://core.svn.wordpress.org/trunk@27221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-03-03 15:54:21 +00:00
parent d2014cfce3
commit 420afb81de
3 changed files with 8 additions and 1 deletions

View File

@ -443,6 +443,13 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
editor.dom.bind( editor.getBody(), 'dragstart', function() {
_hideButtons();
});
editor.dom.bind( editor.getWin(), 'dragover', function(e) {
if ( typeof window.jQuery !== 'undefined' ) {
// Propagate the event to its container for the parent window to catch.
jQuery( editor.getContainer() ).trigger(e);
}
});
});
editor.on( 'BeforeExecCommand', function() {

File diff suppressed because one or more lines are too long