Fix when autosizing textarea elements that are hidden

Found a problem where autosizing was incorrect because the width of textarea elements was zero due to the fact that the container element for the textarea was hidden.