Note that there are some explanatory texts on larger screens.

plurals
  1. POJQuery UI Autocomplete not triggering on typing
    primarykey
    data
    text
    <p>I have a JQuery UI Autocomplete field that accesses a Ruby function behind the scenes. Typing into the box doesn't trigger the call to the server to load the options. Pressing the Down key will do so however and it works fine after that. Any ideas why this might be?</p> <p>HTML</p> <pre><code>&lt;div id="subject_select_dialog" class="ui-dialog-content ui-widget-content" style="width: auto; min-height: 0px; height: 141px; " scrolltop="0" scrollleft="0"&gt; &lt;input id="subject_select" name="subject" size="70" type="text" class="ui-autocomplete-input" autocomplete="off" role="textbox" aria-autocomplete="list" aria-haspopup="true"&gt; &lt;button id="subject_select_clear" name="button" type="clear"&gt;Clear&lt;/button&gt; ... &lt;/div&gt; </code></pre> <p>JavaScript</p> <pre><code>$("#subject_select").autocomplete({ source: "/users/autocomplete", minLength: 2, focus: function( event, ui ) { $( "#subject_select" ).val( ui.item.label ); return false; }, select: function(event, ui) { $("#subject_select").val( ui.item.label ) $("#subject_select_results").html( ui.item.label ) $("#subject_select_id").val( ui.item.value ) return false; } }); </code></pre> <p>Ruby</p> <pre><code>def autocomplete render :json =&gt; UserProfile.list_by_name(params[:term]).to_json end </code></pre> <p>EDIT:</p> <p>Examining the generated HTML, it's flagging my field as <code>Autocomplete="off"</code>. When I manually change that value in my debugger, the correct behavior appears. Why would it be flagging it with such an attribute and how do I fix it?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload