TinyMCE: Propagate the dragover event outside the editor so drag-and-drop uploads can catch it.
props kovshenin. see #19845. git-svn-id: https://develop.svn.wordpress.org/trunk@27372 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7f3c71eff3
commit
e5e40644b7
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user