TokenInput plus jQuery Dialog Context

UPDATE . This seems to be no longer a problem in the latest Fx / Chrome using edge jQuery


PROBLEM : AutoFill will be outside the dialog box, and if you move it, the dialog will move outside the page.

Study

I already checked

Why does jquery ui dialog change autocomplete jquery.tokeninput.js?

And read github requests

but I have the same problems with what I consider the last of all (TokenInput JS and CSS from github jQuery TokenInput ).


Demos and code

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>     
<link rel="stylesheet"        href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/base/jquery-ui.css" type="text/css" />
<script type="text/javascript" src="jquery.tokeninput.js"></script>
<link rel="stylesheet" href="token-input-facebook.css" type="text/css" />

<button id="filterBut">FILTER</button>

<div id="dialog-form" title="Filter" style="border:1px solid black">
    <p class="validateTips">Enter text contained in the respective fields</p>

    <form>
    <fieldset>
        <label for="name">Field1</label><br/><input type="text" name="Flt1" id="Flt1" class="text ui-widget-content ui-corner-all" style="width:300px"/><br/><br/>
        <label for="email">Field2</label><br/><input type="text" name="Flt2" id="Flt2" value="" class="text ui-widget-content ui-corner-all" style="width:300px" />
    </fieldset>
    </form>
</div>
<script>
$(function() {  
   $("#Flt1, #Flt2").tokenInput([
      {id: 7, name: "Ruby"},
      {id: 11, name: "Python"},
      {id: 13, name: "JavaScript"},
      {id: 17, name: "ActionScript"},
      {id: 19, name: "Scheme"},
      {id: 23, name: "Lisp"},
      {id: 29, name: "C#"},
      {id: 31, name: "Fortran"},
      {id: 37, name: "Visual Basic"},
      {id: 41, name: "C"},
      {id: 43, name: "C++"},
      {id: 47, name: "Java"}
    ],{theme:"facebook"});

  $( "#dialog-form" ).dialog({
            autoOpen: false,
            height: 400,
            width: 460,
            modal: true
  });                        
  $( "#filterBut" ).click(function() {

  // suggestion from 
  // /questions/1907164/why-does-jquery-ui-dialog-mangle-my-jquerytokeninputjs-autocomplete
    $("#dialog-form script").remove();
  // does not seem to change anything


    $( "#dialog-form" ).dialog( "open" );
  });

});
</script>         
              </div>     
            </div>
          </form>                  
+3
4

( 94 github). , .

+2

en css div.token-input-dropdown z-index: 1 z-index: 1005.

+2

HTML , , zindex: 1005 .

 ],{theme:"facebook", zindex:1005});

, , .

0
source

This jQuery code solves the hiding problem for me (thanks @ user2192014 and this answer for the idea):

$(".token-input-dropdown-facebook, .token-input-list-facebook").css("z-index","9999");
0
source

All Articles