Fixed bug #14577 Ext.ux.elasticTextArea causes JS errors in all version of IE (Thanks...
authorBenni Mack <benni.mack@typo3.org>
Thu, 17 Jun 2010 08:51:13 +0000 (08:51 +0000)
committerBenni Mack <benni.mack@typo3.org>
Thu, 17 Jun 2010 08:51:13 +0000 (08:51 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7948 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/js/extjs/ux/ext.resizable.js

index a41519c..fe814d0 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2010-06-17  Benjamin Mack  <benni@typo3.org>
 
+       * Fixed bug #14577 Ext.ux.elasticTextArea causes JS errors in all version of IE (Thanks to Jo Hasenau)
        * Partly reverted #14636: Improvements to new Backend skin - reverted TCEforms styling, will be included later
 
 2010-06-16  Susanne Moog  <typo3@susanne-moog.de>
index 42ad348..a18a2e1 100644 (file)
@@ -1003,11 +1003,13 @@ Ext.ux.elasticTextArea = function(){
                                 .replace(/\n/g, '<br />&nbsp;') 
                     );
             
-                       var growBy = parseInt(el.getStyle('line-height')) + 1;
+                       var growBy = parseInt(el.getStyle('line-height'));
+                       growBy = growBy ? growBy + 1 : 1;
                        if (growBy === 1) {
                                growBy = options.growBy;
                        }
-                       var textHeight = this.div.getHeight() + growBy;
+                       var textHeight = this.div.getHeight();
+                       textHeight = textHeight ? textHeight + growBy : growBy;
             
             if ( (textHeight > options.maxHeight ) && (options.maxHeight > 0) ){
                 textHeight = options.maxHeight ;