mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 14:35:07 +00:00
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:
parent
d2014cfce3
commit
420afb81de
@ -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
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user