Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 74f1914

Browse files
Textarea: Make textarea autogrow also work on paste and with multibyte chars. Fixes #4854.
1 parent ba9bcce commit 74f1914

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/widgets/forms/textinput.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ $.widget( "mobile.textinput", $.mobile.widget, {
121121
clientHeight = input[ 0 ].clientHeight;
122122

123123
if ( clientHeight < scrollHeight ) {
124-
input.height(scrollHeight + extraLineHeight);
124+
input.height( scrollHeight + extraLineHeight );
125125
}
126126
};
127127

128-
input.keyup(function() {
128+
input.on( "keyup change input paste", function() {
129129
clearTimeout( keyupTimeout );
130130
keyupTimeout = setTimeout( self._keyup, keyupTimeoutBuffer );
131131
});

0 commit comments

Comments
 (0)