title: jQuery UI autocomplete with IE 11 - wired behavior
body: <p>I want to set autocomplete field. So I wrote</p>
  
  <pre><code>$(document).ready(function() {
      $("#mytext").autocomplete({
           source: function(request, response) {
              $.getJSON("/ajax/autocomplete.php?term=" + $.trim(request.term), function(data) {
                  response($.map(data, function(item) {
                      return {label: highlightResult(item.label, $.trim(request.term))};
                  }));
              });
          },
          minLength: 0
      }).each(function() {
          $(this).data("ui-autocomplete")._renderItem = function(ul, item) {
              return $("&lt;li&gt;&lt;/li&gt;")
                      .data("item.autocomplete", item)
                      .append("&lt;a&gt;" + item.label + "&lt;/a&gt;")
                      .appendTo(ul);
          };
      });
      ...
      $("#mytext").focusin(function() {
          $(this).autocomplete("search", $(this).val());
      });
  });
  </code></pre>
  
  <p>With the HTML:</p>
  
  <pre><code>&lt;div style="visibility: hidden;"/&gt;
      &lt;input type="text" id="mytext" /&gt;
  &lt;/div&gt;
  &lt;button onclick="showDiv();"&gt;Click To Show&lt;/button&gt;
  </code></pre>
  
  <p>This code works fine on Google Chrome. But its works weird on IE 11.</p>
  
  <p>The input is hidden by default, but it will appeared when the button will be clicked.</p>
  
  <p>The weird behavior:<br>
  1) On <strong>refresh</strong> the autocomplete menu appears in the top-left corner of the window (the body).<br>
  2) The menu not showing when there is text in the text box. I see that the <code>data</code> parameter is sometimes (when there is a text), undefined - wierd...</p>
  
  <p>What can I do with these problems? I didn't find any helpful solution.</p>