Fix unresponsive browser on auto-growing input

When the textarea is manually resized by a user, it gets an inline
style applied by the browser that will override the rows properties
no matter what. The while loop looped forever because the textarea
maintained its size and the browser went unresponsive.

This issue is fixed by checking if the textarea has some styles
applied.

A further improvement could be using the debounce plugin to prevent
calculating all the properties on each keystroke.

Bug: 33607
Change-Id: I8e46af40f28baf7002fe35586ea5efdd8a7544a7