Permalink
Browse files

move pagechange binding for textarea autogrow outside the check for t…

…ext content
  • Loading branch information...
1 parent e918442 commit 6f00d35db8a69c6bdeef61de981d367c0d6294ee @johnbender johnbender committed Nov 21, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 js/jquery.mobile.forms.textinput.js
@@ -96,15 +96,15 @@ $.widget( "mobile.textinput", $.mobile.widget, {
keyupTimeout = setTimeout( keyup, keyupTimeoutBuffer );
});
+ // binding to pagechange here ensures that for pages loaded via
+ // ajax the height is recalculated without user input
+ $( document ).one( "pagechange", keyup );
+
// Issue 509: the browser is not providing scrollHeight properly until the styles load
if ( $.trim( input.val() ) ) {
// bind to the window load to make sure the height is calculated based on BOTH
// the DOM and CSS
$( window ).load( keyup );
-
- // binding to pagechange here ensures that for pages loaded via
- // ajax the height is recalculated without user input
- $( document ).one( "pagechange", keyup );
}
}
},

0 comments on commit 6f00d35

Please sign in to comment.