<p dir="auto">I am using twitter bootstrap in my application but every time I try to upload image I get the following error</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/6980311/4112100/a4e7b166-321b-11e4-8ff0-dba89b49c075.png"><img src="https://cloud.githubusercontent.com/assets/6980311/4112100/a4e7b166-321b-11e4-8ff0-dba89b49c075.png" alt="screen shot 2014-09-01 at 11 00 15 pm" style="max-width: 100%;"></a></p>
<p dir="auto">I have just the following  code snippet to register bootstrap<br>
$baseUrl = Yii::app()-&gt;theme-&gt;baseUrl;<br>
$cs = Yii::app()-&gt;getClientScript();<br>
Yii::app()-&gt;clientScript-&gt;registerCoreScript('jquery');<br>
$cs-&gt;registerScriptFile($baseUrl.'/js/bootstrap.js');</p>
<p dir="auto">Also my popups don't work!</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>