title: need click twice after hide a shown bootstrap popover
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$('#popoverlink').popover();
  
  $("#popoverhide").click(function() {
     $("#popoverlink").popover("hide"); 
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#popoverlink {
      position: absolute;
      top: 100px;
      left: 100px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"&gt;&lt;/script&gt;
  &lt;link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/&gt;
  &lt;a href="#" id="popoverlink" class="btn" rel="popover" title="Some title"&gt;Popover&lt;/a&gt;
  &lt;a href="#" id="popoverhide" class="btn" rel="popover" title="Some title"&gt;hide&lt;/a&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Same with the <a href="http://jsfiddle.net/npq3A/98/" rel="noreferrer">fiddle</a>. Sorry the previous link was wrong. This one is correct.</p>
  
  <p>After I hide the shown popover, I need to click the popover trigger twice to show it again.</p>
  
  <p>Is this a bug? Is there anything can avoid this?</p>
  
  <p><strong>UPDATE</strong>
  I means I used another button to hide a popover by </p>
  
  <pre><code>$("#popoverTrigger").popover("hide");
  </code></pre>
  
  <p>Than I need to click the "#popoverTrigger" twice to show it.</p>
  
  <p><strong>STUPID SOLUTION</strong></p>
  
  <pre><code>$("popoverhide").click(function() {
      var f = false;
      if($("popoverlink").next('div.popover:visible')) {
          f = true;
          $("popoverlink").popover("hide");
      }
      if(f) {
          $("popoverlink").click();
      }
  })
  </code></pre>
  
  <p>Is there another good idea?</p>