title: Check if currently active element is any kind of input
body: <p>I am trying to detect if currently active element is any kind of input field. Currently I have this:</p>
  
  <pre><code>var activeElement = document.activeElement
  
  if (activeElement &amp;&amp; (activeElement.tagName.toLowerCase() === 'input' || 
      activeElement.tagName.toLowerCase() === 'textarea' || 
      activeElement.tagName.toLowerCase() === 'select' || 
      activeElement.tagName.toLowerCase() === 'button')) {
      return false
  }
  </code></pre>
  
  <p>Is there a better way to do this? I am using Vue JS, so if there is a solution with Vue API that is ok too.</p>