Ticket #45461: 45461.diff
File 45461.diff, 1.4 KB (added by , 6 years ago) |
---|
-
src/js/_enqueues/vendor/tinymce/plugins/wordpress/plugin.js
19 19 } 20 20 21 21 function toggleToolbars( state ) { 22 var initial, toolbars, 22 var initial, toolbars, iframeHeight, 23 23 pixels = 0, 24 24 classicBlockToolbar = tinymce.$( '.block-library-classic__toolbar' ); 25 25 … … 44 44 if ( i > 0 ) { 45 45 if ( state === 'hide' ) { 46 46 toolbar.hide(); 47 pixels += 3 0;47 pixels += 34; 48 48 } else { 49 49 toolbar.show(); 50 pixels -= 3 0;50 pixels -= 34; 51 51 } 52 52 } 53 53 }); … … 54 54 } 55 55 56 56 // Resize editor iframe, not needed for iOS and inline instances. 57 if ( pixels && ! tinymce.Env.iOS && editor.iframeElement ) { 58 DOM.setStyle( editor.iframeElement, 'height', editor.iframeElement.clientHeight + pixels ); 57 // Don't resize if the editor is in a hidden container. 58 if ( pixels && ! tinymce.Env.iOS && editor.iframeElement && editor.iframeElement.clientHeight ) { 59 iframeHeight = editor.iframeElement.clientHeight + pixels; 60 61 // Keep min-height. 62 if ( iframeHeight > 50 ) { 63 DOM.setStyle( editor.iframeElement, 'height', iframeHeight ); 64 } 59 65 } 60 66 61 67 if ( ! initial ) {