ker/mod/wdg.area.js
function grow(area, min, max) {
  if( typeof min !== 'undefined' ) {
    min = parseInt( min );
    if( isNaN( min ) ) min = 2;
  }
  if( typeof max !== 'undefined' ) {
    max = parseInt( max );
    if( isNaN( max ) ) max = 8;
  }
  if( max < min ) max = min;

  var text = area.value;
  var lines = 1;
  var index = -1;
  for(;;) {
    index = text.indexOf( "\n", index + 1 );
    if( index === -1 ) break;
    lines++;
  }
  index = Math.max( min, Math.min( max, index ) );
  $.att( area, {rows: lines} );
}
function grow(area, min, max) {
  if( typeof min !== 'undefined' ) {
    min = parseInt( min );
    if( isNaN( min ) ) min = 2;
  }
  if( typeof max !== 'undefined' ) {
    max = parseInt( max );
    if( isNaN( max ) ) max = 8;
  }
  if( max < min ) max = min;

  var text = area.value;
  var lines = 1;
  var index = -1;
  for(;;) {
    index = text.indexOf( "\n", index + 1 );
    if( index === -1 ) break;
    lines++;
  }
  index = Math.max( min, Math.min( max, index ) );
  $.att( area, {rows: lines} );
}
function grow ( area , min , max ) { if ( typeof min !== 'undefined' ) { min = parseInt ( min ) ; if ( isNaN ( min ) ) min = 2 ; } if ( typeof max !== 'undefined' ) { max = parseInt ( max ) ; if ( isNaN ( max ) ) max = 8 ; } if ( max < min ) max = min ; var text = area . value ; var lines = 1 ; var index = - 1 ; for ( ; ; ) { index = text . indexOf ( "\n" , index + 1 ) ; if ( index === - 1 ) break ; lines ++ ; } index = Math . max ( min , Math . min ( max , index ) ) ; $ . att ( area , { rows : lines } ) ; }
Check the number of rows regarding the inner text.
Check the number of rows regarding the inner text .