| 338 | | CKEDITOR.editor.prototype.resize = function( width, height, isContentHeight, resizeInner ) |
| 339 | | { |
| 340 | | var container = this.container, |
| 341 | | contents = CKEDITOR.document.getById( 'cke_contents_' + this.name ), |
| 342 | | outer = resizeInner ? container.getChild( 1 ) : container; |
| | 338 | ( function() |
| | 339 | { |
| | 340 | var resizerFixer = CKEDITOR.tools.withInterval( function( container ) |
| | 341 | { |
| | 342 | // We can't simply hide the entire editor otherwise it breaks the host page scroll. (#6212) |
| | 343 | container.setStyle( 'display', 'inline-block' ); |
| | 344 | setTimeout( function() { container.setStyle( 'display', 'block' ); }, 0 ); |
| | 345 | }, 500 ); |
| | 346 | |
| | 347 | CKEDITOR.editor.prototype.resize = function( width, height, isContentHeight, resizeInner ) |
| | 348 | { |
| | 349 | var container = this.container, |
| | 350 | contents = CKEDITOR.document.getById( 'cke_contents_' + this.name ), |
| | 351 | outer = resizeInner ? container.getChild( 1 ) : container; |
| 344 | | // Set as border box width. (#5353) |
| 345 | | outer.setSize( 'width', width, true ); |
| | 353 | // WEBKIT: Webkit requires a chrome re-layout. (#8348) |
| | 354 | CKEDITOR.env.webkit && resizerFixer( this, null, outer ); |
| | 355 | |
| | 356 | // Set as border box width. (#5353) |
| | 357 | outer.setSize( 'width', width, true ); |
| 347 | | // Get the height delta between the outer table and the content area. |
| 348 | | // If we're setting the content area's height, then we don't need the delta. |
| 349 | | var delta = isContentHeight ? 0 : ( outer.$.offsetHeight || 0 ) - ( contents.$.clientHeight || 0 ); |
| 350 | | contents.setStyle( 'height', Math.max( height - delta, 0 ) + 'px' ); |
| | 359 | // Get the height delta between the outer table and the content area. |
| | 360 | // If we're setting the content area's height, then we don't need the delta. |
| | 361 | var delta = isContentHeight ? 0 : ( outer.$.offsetHeight || 0 ) - ( contents.$.clientHeight || 0 ); |
| | 362 | contents.setStyle( 'height', Math.max( height - delta, 0 ) + 'px' ); |