<p dir="auto"><a href="https://github.com/twbs/bootstrap/blob/master/js/dropdown.js#L104">The code in question</a></p>
<p dir="auto">If here is no attr('data-target'), it tries to get selector from href. which caused warning in firefox 23:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Empty string can't be argument for getElementById();"><pre class="notranslate"><code class="notranslate">Empty string can't be argument for getElementById();
</code></pre></div>
<p dir="auto">because some elements that function is fired for have href="#" .</p>
<p dir="auto">I think it should be correct to make the  check like following:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="selector=!/^[\.#:]$/.test(selector) &amp;&amp; selector"><pre class="notranslate"><code class="notranslate">selector=!/^[\.#:]$/.test(selector) &amp;&amp; selector
</code></pre></div>
<p dir="auto"><em>also I wonder why it still uses <code class="notranslate">attr('data-target')</code> instead of  <code class="notranslate">data('target')</code> ?</em></p>
<p dir="auto">I am Using Firefox 22.</p>
<p dir="auto">Reproduce:</p>
<ul dir="auto">
<li>Open <a href="http://getbootstrap.com/components/" rel="nofollow">http://getbootstrap.com/components/</a></li>
<li>The error is visible in the console when clicking anywhere in the page but a dropdown menu.</li>
</ul>
<p dir="auto">I could track down the error to the <code class="notranslate">clearMenus</code> call, which in turn calls <code class="notranslate">getParents</code> where the error finally happens.</p>
<p dir="auto">In <code class="notranslate">getParents</code> the <code class="notranslate">selector</code> variable is set to <code class="notranslate">'#'</code>. This character is stripped away inside jQuery.</p>