Prevent an element from losing focus
<p>We have a lot of <code>input</code>s in a document.<br>
We want to open a dialog that generates text and puts that in the currently focused input.</p>

<p>The problem is that, when I click a button or anything else to open the dialog that input loses focus. I can't determine which input has to get the generated text.</p>

<pre><code>$("#button").click(function(){
    // something should goes here to prevent stealing inputs focus
});
</code></pre>

<p>Is there any solution to prevent stealing focus by that special button?</p>
