Permalink
Browse files

Autogrow: fix height calculation to account for borders Fixes #6180 -…

… Autogrow: calculated height contains border height and Fixes #6178 - Textinput: height not correctly calculated due to box-sizing thanks @jhogervorst
  • Loading branch information...
arschmitz committed Aug 6, 2013
1 parent 4ab19a7 commit 48139f86ede5516aa746113d1df60e3712afb9f4
Showing with 9 additions and 6 deletions.
  1. +9 −6 js/widgets/forms/autogrow.js
@@ -58,12 +58,15 @@ define( [ "jquery", "../../jquery.mobile.core", "../../jquery.mobile.widget", ".
_updateHeight:function() {
this.element.css({
height: "auto"
}).css({
height: this.element[0].scrollHeight + 15 + "px"
});
this.element.css( "height", "auto" );
var scrollHeight = this.element[0].scrollHeight,
borderTop = parseFloat( this.element.css( "border-top-width" ) ),
borderBottom = parseFloat( this.element.css( "border-bottom-width" ) ),
borderHeight = borderTop + borderBottom,
height = scrollHeight + borderHeight + 15;
this.element.css( "height", height + "px" );
},
_setOptions: function( options ){

0 comments on commit 48139f8

Please sign in to comment.