Skip to content

Commit fab9de1

Browse files
committed
Merge pull request jquery-archive#3004 from eddiemonge/patch-7
Fixes jquery-archive#509
2 parents 8fb55a8 + 6b5ca63 commit fab9de1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

js/jquery.mobile.forms.textinput.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@ $.widget( "mobile.textinput", $.mobile.widget, {
8989
clientHeight = input[ 0 ].clientHeight;
9090

9191
if ( clientHeight < scrollHeight ) {
92-
input.css({
93-
height: (scrollHeight + extraLineHeight)
94-
});
92+
input.height(scrollHeight + extraLineHeight);
9593
}
9694
},
9795
keyupTimeout;
@@ -103,8 +101,10 @@ $.widget( "mobile.textinput", $.mobile.widget, {
103101

104102
// Issue 509: the browser is not giving scrollHeight properly until after the document
105103
// is ready.
106-
if ($.trim(input.text())) {
107-
$(keyup);
104+
if ( $.trim( input.val() ) ) {
105+
$(function() {
106+
input.keyup()
107+
});
108108
}
109109
}
110110
},

0 commit comments

Comments
 (0)