diff --git src/js/_enqueues/wp/customize/controls.js src/js/_enqueues/wp/customize/controls.js
index 6c92362410..520258c08b 100644
|
|
|
5277 | 5277 | */ |
5278 | 5278 | ready: function() { |
5279 | 5279 | var control = this; |
| 5280 | |
| 5281 | /* |
| 5282 | * If the section is ready but the control isn't active yet, refresh the |
| 5283 | * CodeMirror instance when the control does become active so it restyles |
| 5284 | * itself according to the element's new dimensions. See #48902. |
| 5285 | */ |
| 5286 | if ( ! control.active() ) { |
| 5287 | control.active.bind( _.once( function () { |
| 5288 | control.deferred.codemirror.done( function () { |
| 5289 | control.editor.codemirror.refresh(); |
| 5290 | } ) |
| 5291 | } ) ); |
| 5292 | } |
| 5293 | |
5280 | 5294 | if ( ! control.section() ) { |
5281 | 5295 | control.initEditor(); |
5282 | 5296 | return; |