Ticket #5353: 5353.patch
File 5353.patch, 2.4 KB (added by , 14 years ago) |
---|
-
_source/core/dom/element.js
1437 1437 if ( !event.data.getTarget().hasClass( 'cke_enable_context_menu' ) ) 1438 1438 event.data.preventDefault(); 1439 1439 } ); 1440 } 1440 }, 1441 1442 /** 1443 * Update the element's size with box model awareness. 1444 * @name CKEDITOR.dom.element.setSize 1445 * @param {String} type [width|height] 1446 * @param {Number} size The length unit in px. 1447 * @param isBorderBox Apply the {@param width} and {@param height} based on border box model. 1448 */ 1449 setSize : ( function() 1450 { 1451 var sides = { 1452 width : [ "border-left-width", "border-right-width","padding-left", "padding-right" ], 1453 height : [ "border-top-width", "border-bottom-width", "padding-top", "padding-bottom" ] 1454 }; 1455 1456 return function( type, size, isBorderBox ) 1457 { 1458 if ( typeof size == 'number' ) 1459 { 1460 if ( isBorderBox && !( CKEDITOR.env.ie && CKEDITOR.env.quirks ) ) 1461 { 1462 var adjustment = 0; 1463 for ( var i = 0, len = sides [ type ].length; i < len; i++ ) 1464 adjustment += parseInt( this.getComputedStyle( sides [ type ][ i ] ) || 0, 10 ); 1465 size -= adjustment; 1466 } 1467 this.setStyle( type, size + 'px' ); 1468 } 1469 } 1470 })() 1441 1471 }); -
_source/themes/default/theme.js
275 275 276 276 CKEDITOR.editor.prototype.resize = function( width, height, isContentHeight, resizeInner ) 277 277 { 278 var numberRegex = /^\d+$/;279 if ( numberRegex.test( width ) )280 width += 'px';281 282 278 var container = this.container, 283 279 contents = CKEDITOR.document.getById( 'cke_contents_' + this.name ), 284 280 outer = resizeInner ? container.getChild( 1 ) : container; … … 287 283 // WEBKIT BUG: Webkit requires that we put the editor off from display when we 288 284 // resize it. If we don't, the browser crashes! 289 285 CKEDITOR.env.webkit && outer.setStyle( 'display', 'none' ); 290 outer.setStyle( 'width', width ); 286 // Set as border box width. (#5353) 287 outer.setSize( 'width', width, true ); 291 288 if ( CKEDITOR.env.webkit ) 292 289 { 293 290 outer.$.offsetWidth;