Ticket #4762: 4762_2.patch
File 4762_2.patch, 3.1 KB (added by , 13 years ago) |
---|
-
_source/plugins/sourcearea/plugin.js
14 14 15 15 init : function( editor ) 16 16 { 17 var sourcearea = CKEDITOR.plugins.sourcearea; 17 var sourcearea = CKEDITOR.plugins.sourcearea, 18 win = CKEDITOR.document.getWindow(); 18 19 19 20 editor.on( 'editingBlockReady', function() 20 21 { … … 48 49 'text-align' : 'left' 49 50 }; 50 51 51 // The textarea height/width='100%' doesn't 52 // constraint to the 'td' in IE strick mode 52 // Making the textarea fixed sized to conque the following bugs: 53 // 1. The textarea height/width='100%' doesn't constraint to the 'td' in IE6/7. 54 // 2. Unexpected scroll behavior happens when textarea is overflowed. (#4762) 53 55 if ( CKEDITOR.env.ie ) 54 56 { 55 if ( !CKEDITOR.env.ie8Compat ) 56 { 57 onResize = function() 58 { 59 // Holder rectange size is stretched by textarea, 60 // so hide it just for a moment. 61 textarea.hide(); 62 textarea.setStyle( 'height', holderElement.$.clientHeight + 'px' ); 63 // When we have proper holder size, show textarea again. 64 textarea.show(); 65 }; 66 editor.on( 'resize', onResize ); 67 editor.on( 'afterCommandExec', function( event ) 68 { 69 if ( event.data.name == 'toolbarCollapse' ) 70 onResize(); 71 }); 72 styles.height = holderElement.$.clientHeight + 'px'; 73 } 74 } 57 onResize = function() 58 { 59 // Holder rectange size is stretched by textarea, 60 // so hide it just for a moment. 61 textarea.hide(); 62 textarea.setStyle( 'height', holderElement.$.clientHeight + 'px' ); 63 textarea.setStyle( 'width', holderElement.$.clientWidth + 'px' ); 64 // When we have proper holder size, show textarea again. 65 textarea.show(); 66 }; 67 68 editor.on( 'resize', onResize ); 69 win.on( 'resize', onResize ); 70 setTimeout( onResize, 0 ); 71 } 75 72 else 76 73 { 77 74 // By some yet unknown reason, we must stop the … … 139 136 editor.textarea = textarea = null; 140 137 141 138 if ( onResize ) 139 { 142 140 editor.removeListener( 'resize', onResize ); 141 win.removeListener( 'resize', onResize ); 142 } 143 143 144 144 if ( CKEDITOR.env.ie && CKEDITOR.env.version < 8 ) 145 145 holderElement.removeStyle( 'position' ); -
_source/plugins/toolbar/plugin.js
263 263 264 264 var dy = toolboxContainer.$.offsetHeight - previousHeight; 265 265 contents.setStyle( 'height', ( contentHeight - dy ) + 'px' ); 266 267 editor.fire( 'resize' ); 266 268 }, 267 269 268 270 modes : { wysiwyg : 1, source : 1 }