sproutcore/sproutcore — pull request #1288 by tobias-g (2014-08-04 15:25:11+00:00)
Title: Auto resize padding fix for SC.TextFieldView

Noticed an issue with autoresizing when it comes to input and textarea fields. If you want padding on the inputs you need to set the box-sizing css attr on the input or texarea element as border-box so that the 100% width takes padding into account (this isnt the issue).

The issue is that with this setup the prepareLayerForStringMeasurement doesn't take into account the padding when setting the max width of the autoResizeLayer (textarea or input) so when the value changes the max-width ends up being set to the elements width minus the padding.

The fix for this was to set the max width as the outerWidth and I also added a couple of unit tests to check this works and try to explain the issue a bit more.