jackmoore/autosize — pull request #134 by neilbowers (2014-01-08 09:57:29+00:00)
Title: Fixes some situations where element is 'offscreen'

This is a change to setWidth that addresses at least some cases where the size calculation doesn't currently work, because the element is offscreen (in my case, contained in an element that has display: none). The textarea had an explicit pixel width set, but still no joy.

In this situation, getBoundingClientRect() results in a width calculated to be 0, but the fallback calculation (for IE8 and lower) gives the right result.

This fixed the one problem I had when using autosize, and doesn't break any existing work cases.

Cheers,
Neil