title: ionic 3 textarea autosize (not ion-textarea)
body: <p>I need autosize (elastic) for &lt;textarea&gt;.
  I need to use &lt;textarea&gt;, cannot use &lt;ion-textarea&gt; for other issues.</p>
  
  <p>I was following: <a href="https://stackoverflow.com/questions/47547571/how-to-autoresize-the-ion-input-field-vertically-while-i-am-typing?answertab=active">How to autoresize the ion-input field vertically while i am typing</a> &amp;  <a href="https://stackblitz.com/edit/expandable-input" rel="nofollow noreferrer">https://stackblitz.com/edit/expandable-input</a></p>
  
  <p>&lt;ion-textarea&gt; is working:</p>
  
  <pre><code>@Directive({ selector: 'ion-textarea[autosize]' })
  </code></pre>
  
  <p>But, Not for &lt;textarea&gt; </p>
  
  <pre><code>@Directive({ selector: 'textarea[autosize]' })
  </code></pre>
  
  <p>Here is My Stackblitz (autosize not working): <a href="https://stackblitz.com/edit/expandable-input-htjncw" rel="nofollow noreferrer">https://stackblitz.com/edit/expandable-input-htjncw</a></p>
  
  <p>Console error: "ERROR TypeError: Cannot read property 'style' of undefined ..."</p>
  
  <p>Code:</p>
  
  <pre><code>adjust():void {
      const textArea = this.element.nativeElement.getElementsByTagName('textarea')[0];
      textArea.style.overflow = 'hidden';
      textArea.style.height = 'auto';
      textArea.style.height = textArea.scrollHeight + 'px';
    }
  </code></pre>