Autocomplete Jquery UI doesn't display on iPad

Viewed 6

I already read all the topics there about a similar issue but no real solution.

I just received an old project using Jquery UI, the form has a autocomplete input, it works perfectly on computers & phones, when you type 3 letters minimum, it suggests a list of words. BUT when you try the same form on iPad, nothing happens. It suggests nothing.

Here the code (based on Jquery 2.2.3 & Jquery UI 1.11.4) :

HTML :

<input type="text" class="form-control autocomplete-multiple-theme-name ui-autocomplete-input" style="width: 100%;" autocomplete="off">
<input type="hidden" class="autocomplete-multiple-theme-id">

JS :

$(".autocomplete-theme-label").autocomplete({
    minLength: 3,
     source: 'themes_json.php',
     focus: function( event, ui ) {
       $(this).val( ui.item.label );
       return false;
     },
     select: function( event, ui ) {
       $(this).val( ui.item.label);
       $(this).next(".autocomplete-theme-id").val( ui.item.id );

       return false;
     }
    })

    .autocomplete( "instance" )._renderItem = function( ul, item ) {
      return $( "<li>" )
        .append( "<div>" + item.label + "</div>" )
        .appendTo( ul );
      }; 

Any idea to fix that ? Thanks a lot everybody !

0 Answers
Related