Skip to content
This repository
Browse code

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

…ext content
  • Loading branch information...
commit 6f00d35db8a69c6bdeef61de981d367c0d6294ee 1 parent e918442
John Bender authored November 21, 2011

Showing 1 changed file with 4 additions and 4 deletions. Show diff stats Hide diff stats

  1. 8  js/jquery.mobile.forms.textinput.js
8  js/jquery.mobile.forms.textinput.js
@@ -96,15 +96,15 @@ $.widget( "mobile.textinput", $.mobile.widget, {
96 96
 				keyupTimeout = setTimeout( keyup, keyupTimeoutBuffer );
97 97
 			});
98 98
 
  99
+			// binding to pagechange here ensures that for pages loaded via
  100
+			// ajax the height is recalculated without user input
  101
+			$( document ).one( "pagechange", keyup );
  102
+
99 103
 			// Issue 509: the browser is not providing scrollHeight properly until the styles load
100 104
 			if ( $.trim( input.val() ) ) {
101 105
 				// bind to the window load to make sure the height is calculated based on BOTH
102 106
 				// the DOM and CSS
103 107
 				$( window ).load( keyup );
104  
-
105  
-				// binding to pagechange here ensures that for pages loaded via
106  
-				// ajax the height is recalculated without user input
107  
-				$( document ).one( "pagechange", keyup );
108 108
 			}
109 109
 		}
110 110
 	},

0 notes on commit 6f00d35

Please sign in to comment.
Something went wrong with that request. Please try again.