Changeset 7018
- Timestamp:
- 06/08/11 08:25:51 (2 years ago)
- Location:
- CKEditor/trunk
- Files:
-
- 2 edited
-
CHANGES.html (modified) (2 diffs)
-
_source/plugins/autogrow/plugin.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/trunk/CHANGES.html
r7015 r7018 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 2 <!-- 3 3 Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. … … 96 96 <li><a href="http://dev.ckeditor.com/ticket/7915">#7915</a> : [IE] Editing iframe height value missing from the Iframe dialog.</li> 97 97 <li><a href="http://dev.ckeditor.com/ticket/7953">#7953</a> : [IE] Text selection lost after open native context menu.</li> 98 <li><a href="http://dev.ckeditor.com/ticket/7984">#7984</a> : The autogrow plugin breaks in quirks mode content document.</li> 98 99 <li>Updated the following language files:<ul> 99 100 <li><a href="http://dev.ckeditor.com/ticket/7834">#7834</a> : Dutch;</li> -
CKEditor/trunk/_source/plugins/autogrow/plugin.js
r6921 r7018 13 13 init : function( editor ) 14 14 { 15 var lastContentHeight;15 var contentMargin = 0; 16 16 var resizeEditor = function( editor ) 17 17 { … … 26 26 newHeight; 27 27 28 var delta = 29 // Delta height by checking scrollHeight. 30 ( CKEDITOR.env.ie && CKEDITOR.env.quirks ? body.scrollHeight - body.clientHeight 31 : htmlElement.scrollHeight - ( htmlElement.clientHeight || htmlElement.offsetHeight ) ) 32 // Negative scrollHeight (content reduced) is not supported in some browsers, figure it out by watching over the content size. 33 || ( body.clientHeight < lastContentHeight ? body.clientHeight - lastContentHeight : 0 ); 28 // Quirks mode overflows body, standards oveflows document element. 29 var delta, 30 scrollable = doc.$.compatMode == 'BackCompat' ? body : htmlElement, 31 increase = scrollable.scrollHeight - scrollable.clientHeight, 32 decrease = body.offsetHeight - scrollable.scrollHeight + contentMargin; 34 33 35 if ( delta ) 34 // Delta height from either increasing or decreasing. 35 if ( delta = increase ||decrease || 0 ) 36 36 { 37 37 newHeight = currentHeight + delta; … … 50 50 resizeable.setStyle( 'height', newHeight + 'px' ); 51 51 editor.fire( 'resize' ); 52 // Calculate and record now the margin between the actual content size and page size. 53 setTimeout( function() { contentMargin = scrollable.scrollHeight - body.offsetHeight; }, 0 ); 54 52 55 } 53 56 } 54 55 lastContentHeight = body.clientHeight;56 57 }; 57 58 … … 68 69 setTimeout( function(){ resizeEditor( evt.editor ); }, 100 ); 69 70 } 70 });71 }71 }); 72 } 72 73 } 73 74 });
Note: See TracChangeset
for help on using the changeset viewer.
