How to detect when entire form is out of focus?
<p>I have a text form with an input field for name and an input field for email. On the mobile site, when the user clicks on a field, it is brought to the top of the viewport with the keypad below it. However, when either text field is de-selected, it gets stuck here and does not reset.</p>

<p>I have found the jquery focusOut event to reset the page zoom, but this fires whenever either field is not focused (ie. when the name fields is active and email is not). How can I detect when NEITHER input field is in focus? </p>

<p>Right now my form code is:</p>

<pre><code>&lt;form class="form-signin" action="http://" method="post" id="subForm" onsubmit="movedrop()"&gt; 
        &lt;input type="text" class="form-control" id="fieldName" name="cm-name" placeholder="Full Name" tabindex=1 required&gt;
        &lt;label for="inputEmail" class="sr-only"&gt;Email address&lt;/label&gt;
        &lt;input type="email" id="fieldEmail" name="cm-hjjhkh-hjjhkh" class="form-control" placeholder="Email" tabindex=2 required&gt;
        &lt;button class="btn btn-lg btn-white btn-block subscribe" id="click-subscribe" type="submit" tabindex=3&gt;SUBSCRIBE&lt;/button&gt;
&lt;/form&gt;
</code></pre>

<p>and my javascript:</p>

<pre><code>$("form").focusout(function() {
document.body.scrollTop = 0;
console.log("focus out");
})
</code></pre>

<p>Which fires every time either field is deselected. I want it to fire when neither is selected.</p>