title: Javascript document.activeElement is undefined on mobile
body: <p>So currently this function works on desktop but when I test it on mobile I get &quot;undefined.&quot; I checked to see if activeElement is compatible on iPhone safari and it says it works there so I'm currently lost. Any fixes or alternatives?</p>
  <p>This is the button that is selected.</p>
  <pre><code>&lt;input type='button' id='slogan-button' onclick='changeSlogan()' value='Junior Varsity'&gt;
  </code></pre>
  <p>This is the function to make it work.</p>
  <pre><code>&lt;script&gt;
      function changeSlogan() {
          const activeSlogan = document.activeElement.value;
        document.getElementById('slogan-input').value = activeSlogan;
        document.getElementById('slogan-display').innerHTML = activeSlogan;
      }
  &lt;/script&gt;
  </code></pre>
  <p>This is supposed to allow a slogan to be selected and the value of the slogan is added into a input, I get the equal value of the selected slogan only on desktop.</p>