title: Javascript clear input field on moving focus from one input field to the other
body: <p>I have the following code on a input number field:</p>
  
  <pre><code>&lt;input class="quantity_container" v-model="length.quantity" 
      type="number" pattern="[0-9]*" inputmode="numeric" 
      onfocus="if (this.value == '0') this.value = '';"/&gt;
  </code></pre>
  
  <p>The code to clear the field works if no other input field was in focus before I switched to the new input field that has a '0' in it. The page has many input fields and I can’t access them by name unfortunately. I’ve checked and the onfocus is getting called, but the field is never cleared when it is '0' and moving focus from one input field to the other.</p>
  
  <p>It only clears if I tap away and remove focus on the last input field and then gain focus on the new one.</p>
  
  <p>Any help greatly appreciated.</p>