Changeset 30361
- Timestamp:
- 11/16/2014 11:11:14 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js
r30318 r30361 9 9 editorWrapParent = tinymce.$( '#postdivrich' ), 10 10 tb; 11 12 function isPlaceholder( node ) { 13 return !! ( editor.dom.getAttrib( node, 'data-mce-placeholder' ) || editor.dom.getAttrib( node, 'data-mce-object' ) ); 14 } 11 15 12 16 editor.addButton( 'wp_img_remove', { … … 268 272 var delay = iOS ? 350 : 100; 269 273 270 if ( event.element.nodeName !== 'IMG' ) {274 if ( event.element.nodeName !== 'IMG' || isPlaceholder( event.element.nodeName ) ) { 271 275 tb.hide(); 272 276 return; … … 276 280 var element = editor.selection.getNode(); 277 281 278 if ( element.nodeName === 'IMG' ) {282 if ( element.nodeName === 'IMG' && ! isPlaceholder( element ) ) { 279 283 if ( tb._visible ) { 280 284 tb.reposition();
Note: See TracChangeset
for help on using the changeset viewer.