Merge pull request #3004 from eddiemonge/patch-7

Fixes #509
This commit is contained in:
Mat Marquis 2011-11-09 08:43:29 -08:00
commit fab9de10b4

View file

@ -89,9 +89,7 @@ $.widget( "mobile.textinput", $.mobile.widget, {
clientHeight = input[ 0 ].clientHeight;
if ( clientHeight < scrollHeight ) {
input.css({
height: (scrollHeight + extraLineHeight)
});
input.height(scrollHeight + extraLineHeight);
}
},
keyupTimeout;
@ -103,8 +101,10 @@ $.widget( "mobile.textinput", $.mobile.widget, {
// Issue 509: the browser is not giving scrollHeight properly until after the document
// is ready.
if ($.trim(input.text())) {
$(keyup);
if ( $.trim( input.val() ) ) {
$(function() {
input.keyup()
});
}
}
},