title: How to Set focus to first text input in a bootstrap modal after shown
body: <p>I load a dynamic bootstrap modal and it contains few text inputs. The issue i face that i want the cursor to focus on the first input in this modal, and this is not happening by default.<br>
  So i wrote this code to do it:</p>
  
  <pre><code>$('#modalContainer').on('show', function () {
     $('input:text:visible:first').focus();
  });
  </code></pre>
  
  <p>But now it focus on the in the input for a moment then go away automatically, why this is happening and how to solve?</p>