From 6b5ca6311adfa60ed791bcd3373e77c70c244a21 Mon Sep 17 00:00:00 2001 From: "Eddie Monge Jr." Date: Wed, 9 Nov 2011 08:32:00 -0800 Subject: [PATCH] Remove unneeded css as height will suffice. Trigger the inputs keyup. Im not sure calling $(keyup) called the function on the element. --- js/jquery.mobile.forms.textinput.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/jquery.mobile.forms.textinput.js b/js/jquery.mobile.forms.textinput.js index d52084e44a8..1d1eb280785 100644 --- a/js/jquery.mobile.forms.textinput.js +++ b/js/jquery.mobile.forms.textinput.js @@ -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() + }); } } },