Cannot type (or even focus) in input type="text" while bootstrap modal is open
<p>I have a jquery code that creates a dropdown menu and places it exactly where the user right-clicked. Everything works fine except one thing: I cannot type inside an input field.</p>

<p>The generated dropdown looks as follows:</p>

<pre><code>&lt;ul role="menu" style="display: none; position: absolute; left: 751px; top: 294px; z-index: 999999;"&gt;
    &lt;li&gt;&lt;a href="#"&gt;Link 1&lt;/a&gt;&lt;/li&gt;
    &lt;li role="separator" class="divider"&gt;&lt;/li&gt;
    &lt;li&gt;&lt;input type="text" name="filter"&gt;&lt;/li&gt;
    &lt;li style="height:200px;" class="scroll-container-y"&gt;
        &lt;ul class="list-unstyled gutter-left-small"&gt;
            &lt;li&gt;&lt;a href="#"&gt;Sublink 1&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#"&gt;Sublink 2&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#"&gt;Sublink 3&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
    &lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>In my idea, the input will be used to filter the Sublinks.</p>

<p>What I've tried (with no results):</p>

<ul>
<li>Change z-index</li>
<li>Force $('input').focus()</li>
<li>Force $('input').get(0).focus()</li>
<li>Playing around with CSS to check if it was just white text over white background</li>
<li>Reviewed code to see if some other jQuery was interfering</li>
</ul>

<p>Hope you guys can help.</p>

<p>EDIT (working example):
It appears that this is a Bootstrap problem: as you can see from this fiddle <a href="http://jsfiddle.net/2gkjb0h8/3/" rel="noreferrer">http://jsfiddle.net/2gkjb0h8/3/</a> the input can be entered UNTIL the bootstrap modal is opened. Still no clue on how to solve this.</p>

<p>EDIT 2:
Here's an image of what I want to achieve <a href="http://prnt.sc/bxbucf" rel="noreferrer">http://prnt.sc/bxbucf</a>
In the modal, there will be a table with selectable TDs; once selected, the user can right click to open a context menu with a list of teachers (each of them is a link). This works already, the input is there to allow filtering all the possible names.</p>