Permalink
Browse files

Textarea: Make textarea autogrow also work on paste and with multibyt…

…e chars. Fixes #4854.
  • Loading branch information...
1 parent ba9bcce commit 74f1914f9417114e832a61e3c17c42dc08615588 @jaspermdegroot jaspermdegroot committed Dec 3, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 js/widgets/forms/textinput.js
@@ -121,11 +121,11 @@ $.widget( "mobile.textinput", $.mobile.widget, {
clientHeight = input[ 0 ].clientHeight;
if ( clientHeight < scrollHeight ) {
- input.height(scrollHeight + extraLineHeight);
+ input.height( scrollHeight + extraLineHeight );
}
};
- input.keyup(function() {
+ input.on( "keyup change input paste", function() {
clearTimeout( keyupTimeout );
keyupTimeout = setTimeout( self._keyup, keyupTimeoutBuffer );
});

0 comments on commit 74f1914

Please sign in to comment.