TinyMCE: when deleting an image, ensure the wrapping link (if any) is deleted too. Fixes the erroneous showing of the link toolbar after deleting an image. Also small readability fix.

See #32604. 
Built from https://develop.svn.wordpress.org/trunk@33141


git-svn-id: http://core.svn.wordpress.org/trunk@33112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2015-07-09 00:25:25 +00:00
parent d5de83fb6e
commit 7e51b698c6
6 changed files with 9 additions and 9 deletions

View File

@ -820,7 +820,9 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
clearTimeout( timeout );
timeout = setTimeout( function() {
activeToolbar && activeToolbar.show && activeToolbar.show();
if ( activeToolbar && typeof activeToolbar.show === 'function' ) {
activeToolbar.show();
}
}, 250 );
}
}

File diff suppressed because one or more lines are too long

View File

@ -525,12 +525,10 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
}
function removeImage( node ) {
var wrap;
var wrap = editor.dom.getParent( node, 'div.mceTemp' );
if ( node.nodeName === 'DIV' && editor.dom.hasClass( node, 'mceTemp' ) ) {
wrap = node;
} else if ( node.nodeName === 'IMG' || node.nodeName === 'DT' || node.nodeName === 'A' ) {
wrap = editor.dom.getParent( node, 'div.mceTemp' );
if ( ! wrap && node.nodeName === 'IMG' ) {
wrap = editor.dom.getParent( node, 'a' );
}
if ( wrap ) {

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-beta2-33140';
$wp_version = '4.3-beta2-33141';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.