jackmoore/autosize — pull request #38 by juriejan (2012-11-16 07:05:39+00:00)
Title: Exit for un-rendered element

I didn't have much time so I implemented this quick fix for my project.

The textarea sizes where huge if I ran autosize on them before they where inserted into the DOM. My first instinct was to stop the plugin from doing anything if it seems that the element hasn't been rendered yet.

I guess it might be more specific (but slower) to check if the 'body' element is an ancestor of the element being autosized. What do you think?