Permalink
Browse files

Merge pull request #5848 from jhogervorst/issue-5690

Textinput: height correctly calculated (without extra padding) for box-sizing
  • Loading branch information...
1 parent 8ff0c55 commit 60789e2b155ffa8398beef7c12c796fb58592f08 @jaspermdegroot jaspermdegroot committed Apr 3, 2013
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" ) ),
+ paddingBottom = parseFloat( input.css( "padding-bottom" ) ),
+ paddingHeight = paddingTop + paddingBottom;
+
+ input.height( scrollHeight - paddingHeight + extraLineHeight );
}
};

0 comments on commit 60789e2

Please sign in to comment.