title: Setting Disabled Attribute doesn't submit forms on Safari iOS
body: <p>I am trying to do a fancy button with some animations to disable it once clicked (or touched on mobile phones). However; I am facing an issue. The issue is that setting the <code>disabled</code> attribute does complete the animation, but doesn't submit the form. It's working on PCs, though!</p>
  <pre class="lang-html prettyprint-override"><code>&lt;form class=&quot;needs-validation&quot; action=&quot;&quot; method=&quot;post&quot; enctype=&quot;application/x-www-form-urlencoded&quot; role=&quot;form&quot;&gt;
      &lt;div class=&quot;card shadow&quot;&gt;
          &lt;div class=&quot;card-body&quot;&gt;
              &lt;h2 class=&quot;card-title text-center&quot;&gt;Form&lt;/h2&gt;
              &lt;div class=&quot;form-floating mb-3&quot;&gt;
                  &lt;input class=&quot;form-control&quot; name=&quot;id&quot; placeholder=&quot;Enter ID&quot; type=&quot;text&quot; required&gt;
                  &lt;label&gt;ID&lt;label&gt;
              &lt;/div&gt;
              &lt;div class=&quot;mb-3 text-end&quot;&gt;
                  &lt;button type=&quot;submit&quot; class=&quot;btn btn-primary&quot; name=&quot;submit&quot; id=&quot;submit&quot;
                      onclick=&quot;submitForm();&quot;&gt;Search&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  <pre class="lang-js prettyprint-override"><code>function submitForm() {
      var submitBtn = document.getElementById(&quot;submit&quot;);
      submitBtn.innerHTML = '&lt;span class=&quot;spinner-border spinner-border-sm&quot; role=&quot;status&quot; aria-hidden=&quot;true&quot;&gt;&lt;/span&gt; &amp;nbsp; Searching...';
      submitBtn.setAttribute(&quot;disabled&quot;, true);
  }
  </code></pre>
  <p>What am I missing or is it a bug with Safari on iOS?</p>
  <p><strong>EDIT:</strong></p>
  <p>Tried <code>ontouchend=submitForm();</code> but didn't solve the issue.</p>