Permalink
Browse files

Textarea: Use feature detection to avoid setting height to 0 on IE8

Also replaces the immediate height update with a timed one, because the
immediate height update issued from _autogrow() is having no effect in IE.

Fixes gh-6998
  • Loading branch information...
gabrielschulhof committed Jan 27, 2014
1 parent 24630f6 commit a91747c0eda1357166079e2fa9101cc3547f469b
Showing with 9 additions and 6 deletions.
  1. +9 −6 js/widgets/forms/autogrow.js
@@ -65,7 +65,7 @@ define( [
this.element.removeClass( "ui-textinput-autogrow-resize" );
}, this ) );
}
this._prepareHeightUpdate();
this._timeout();
}
},
@@ -96,11 +96,14 @@ define( [
this.keyupTimeout = 0;
this.element.css({
"height": 0,
"min-height": 0,
"max-height": 0
});
// IE8 textareas have the onpage property - others do not
if ( !( "onpage" in this.element[ 0 ] ) ) {
this.element.css({
"height": 0,
"min-height": 0,
"max-height": 0
});
}
var paddingTop, paddingBottom, paddingHeight,
scrollHeight = this.element[ 0 ].scrollHeight,

0 comments on commit a91747c

Please sign in to comment.