Changeset 44832
- Timestamp:
- 03/12/2019 08:13:14 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/vendor/tinymce/plugins/wordpress/plugin.js
r44697 r44832 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' ); … … 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 } … … 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
Note: See TracChangeset
for help on using the changeset viewer.