title: jQuery Validate: Detecting underlying click instead of blur
body: <p>I have a form that I create within a Bootbox (itself a layer on top of Bootstrap's modal). Once it is created, I call </p>
  
  <p><code>$('#myForm').validate()</code></p>
  
  <p>on it.</p>
  
  <p>The desirable part of the behaviour is that now as the user tabs through the forms, they can see immediate feedback that they've messed up one of the fields. Entered a non-email address before hitting "tab" or clicking elsewhere? Warning and error message. Great!</p>
  
  <p>But the undesirable thing is that the blur eats other events. So, if a user instead chooses to hit "cancel" (knowing full well that the form is invalid), the click on the cancel is not heard and its handler will not fire. A second click (now that the focus is off the form altogether) and cancel fires as expected. I don't want the users to have to click twice.</p>
  
  <p>I saw a technique for disabling the blur altogether, but then the desirable behaviour described above is then lost, which I do not want either. Ideally, a "well, I blurred, but I also know what the user was clicking" is what I'm after.</p>
  
  <p>[EDIT TO ADD:]</p>
  
  <p>It has come to my attention that this is confusing, so let me try a different approach to the question: is it possible to be working on a form (that has had <code>.validate()</code> called on it), then click on any other clickable item on the whole page and have its click handler successfully fire?</p>
  
  <p>[EDIT AGAIN:]</p>
  
  <p>Based on Sparky's demo, I wired up a warning to show below the inputs on blur. So, to see the problem in action, fire up this fiddle: <a href="https://jsfiddle.net/bd1fhpu3/" rel="nofollow noreferrer">https://jsfiddle.net/bd1fhpu3/</a></p>
  
  <p>Then click into one of the input fields BEFORE clicking "just a button". Click in an upper sliver of "just a button" to make sure that the warning labels have pushed it out of the cursor's hotspot on release of the mouse button.</p>
  
  <p>Anyhow, this just explains what the problem is. Solving it is probably not within the scope of the question anymore, but it seemed worth sharing in case anybody else comes across this. To solve, I will either need to override Bootbox's click event to be a mousedown event instead of a click (then you don't need to press and release), or I can "Band-Aid"(tm) the solution by avoiding relocating the button. Maybe a static-height dialog that's tall enough to accomodate the form and any possible warnings. Definitely somewhat of a "hack" like this because you just never know if you're going to do other things later that make the problem appear again. But it'd be a quick and easy temp fix.</p>