Ticket #32003: 32003.patch
File 32003.patch, 1.3 KB (added by , 9 years ago) |
---|
-
src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js
452 452 453 453 if ( parent = dom.getParent( node, 'p' ) ) { 454 454 parent.parentNode.insertBefore( wrap, parent ); 455 456 if ( dom.isEmpty( parent ) ) {457 dom.remove( parent );458 }459 455 } else { 460 456 node.parentNode.insertBefore( wrap, node ); 461 457 } 462 458 463 459 editor.$( wrap ).find( 'dt.wp-caption-dt' ).append( node ); 460 461 if ( parent && dom.isEmpty( parent ) ) { 462 dom.remove( parent ); 463 } 464 464 } 465 465 } else if ( captionNode ) { 466 466 // Remove the caption wrapper and place the image in new paragraph … … 734 734 735 735 if ( parent = dom.getParent( node, 'p' ) ) { 736 736 parent.parentNode.insertBefore( wrap, parent ); 737 738 if ( dom.isEmpty( parent ) ) {739 dom.remove( parent );740 }741 737 } else { 742 738 node.parentNode.insertBefore( wrap, node ); 743 739 } 744 740 745 741 editor.$( wrap ).find( 'dt.wp-caption-dt' ).append( node ); 742 743 if ( parent && dom.isEmpty( parent ) ) { 744 dom.remove( parent ); 745 } 746 746 } 747 747 } else { 748 748 if ( wrap ) {