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

Commit b33580e

Browse files
committed
Textinput: calculated height without extra padding. Fixed #5690 - Textinput: height not correctly calculated due to box-sizing
1 parent 418cbea commit b33580e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

js/widgets/forms/textinput.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,11 @@ $.widget( "mobile.textinput", $.mobile.widget, {
125125
clientHeight = input[ 0 ].clientHeight;
126126

127127
if ( clientHeight < scrollHeight ) {
128-
input.height( scrollHeight + extraLineHeight );
128+
var paddingTop = parseFloat( input.css( "padding-top" ) ) || 0,
129+
paddingBottom = parseFloat( input.css( "padding-bottom" ) ) || 0,
130+
paddingHeight = paddingTop + paddingBottom;
131+
132+
input.height( scrollHeight - paddingHeight + extraLineHeight );
129133
}
130134
};
131135

0 commit comments

Comments
 (0)