title: Prevent losing focus when click out of an input
body: <p>I'm developing a virtual keyboard in jQuery and my problem is: </p>
  
  <p>When I click on a key of the keyboard the input loses the focus during the click, and if the number of letters in the input is longer than the input size, the input shows the beginning of the string. And then when the click is released the input gets back the focus and the caret comes to the end of the string. So it's quite ugly because we have the impression that the input contents blink.</p>
  
  <pre><code>theButtonDiv.click(function() {
      attachedInput.value = idOfAttachedInput.value + theActualKey;
      attachedInput.focus();
  });
  </code></pre>
  
  <p>So I would like to prevent the input from losing the focus when we clicked on a button of the keyboard.</p>
  
  <p>How can I do this?</p>
  
  <p>Thanks.</p>