title: Bootstrap dropdown searchbar closing on click
body: <p>I've got a dropdown searchbar on my site which closes when clicked. 
  I'm trying to prevent this, but I can't find it myself. </p>
  
  <pre><code>&lt;nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"&gt;
  &lt;div class="container-fluid"&gt;
      &lt;div class="navbar-header"&gt;
        &lt;button type="button" class="navbar-toggle" data-toggle="collapse" 
              data-target="#navbar-collapse"&gt;
          &lt;span class="sr-only"&gt;Toggle navigation&lt;/span&gt;
          &lt;span class="icon-bar"&gt;&lt;/span&gt;
          &lt;span class="icon-bar"&gt;&lt;/span&gt;
          &lt;span class="icon-bar"&gt;&lt;/span&gt;
        &lt;/button&gt;
        &lt;a class="navbar-brand logo" href="#"&gt;BrandName&lt;/a&gt;
      &lt;/div&gt;
  
    &lt;div class="collapse navbar-collapse" id="navbar-collapse"&gt;
        &lt;ul class="nav navbar-nav"&gt;
          &lt;li&gt;&lt;a href="#"&gt;link1&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;link2&lt;/a&gt;&lt;/li&gt;
  
        &lt;/ul&gt;
  
        &lt;button type="button" data-toggle="dropdown" class="btn btn-default dropdown-toggle hidden-xs pull-right" &gt;&lt;span class="glyphicon glyphicon-search"&gt;&lt;/span&gt; &lt;/button&gt;
          &lt;div class="dropdown-menu pull-right"&gt;
            &lt;form class="navbar-form pull-right " role="search"&gt;
          &lt;div class="form-group"&gt;
            &lt;input type="text" class="form-control" placeholder="Zoeken"&gt;
          &lt;/div&gt;
          &lt;/div&gt;
  
        &lt;div class="search-phone visible-xs" &gt;
        &lt;form class="navbar-form  " role="search"&gt;
          &lt;div class="form-group search-phone2"&gt;
            &lt;input type="text" class="form-control" placeholder="Zoeken"&gt;
            &lt;button type="button" class="btn btn-default" &gt;&lt;span class="glyphicon glyphicon-search"&gt;&lt;/span&gt;
             &lt;/button&gt; 
          &lt;/div&gt;      
        &lt;/form&gt;
        &lt;/div&gt;
  
      &lt;/div&gt;
    &lt;/div&gt; &lt;!-- container-fluid --&gt;
  &lt;/nav&gt;
  </code></pre>
  
  <p>I've tried different thing like this:
  I don't know if this is the best way.</p>
  
  <pre><code>&lt;script&gt;
  
      $('.input.form-control').click(function(e) {
          e.stopPropagation();
          });
  
      &lt;/script&gt;
  </code></pre>
  
  <p>But I can't find the solution. </p>