Permalink
Browse files

Textinput: calculated height without extra padding. Fixed #5690 - Tex…

…tinput: height not correctly calculated due to box-sizing
  • Loading branch information...
jhogervorst committed Apr 3, 2013
1 parent 418cbea commit b33580ee35f2c10515695daf0a4a78b4bcf87753
Showing with 5 additions and 1 deletion.
  1. +5 −1 js/widgets/forms/textinput.js
@@ -125,7 +125,11 @@ $.widget( "mobile.textinput", $.mobile.widget, {
clientHeight = input[ 0 ].clientHeight;
if ( clientHeight < scrollHeight ) {
input.height( scrollHeight + extraLineHeight );
var paddingTop = parseFloat( input.css( "padding-top" ) ) || 0,
paddingBottom = parseFloat( input.css( "padding-bottom" ) ) || 0,
paddingHeight = paddingTop + paddingBottom;
input.height( scrollHeight - paddingHeight + extraLineHeight );
}
};

0 comments on commit b33580e

Please sign in to comment.