mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user