Search code examples
jqueryjquery-autocompletelost-focus

jQuery Autocomplete loosing focus on selecting value


I am using the jQuery autocomplete and not UI autocomplete. with option multi = true. However when I select the first option with enter key, the focus is lot from the input control. Even the demo page (http://jquery.bassistance.de/autocomplete/demo/ [try typing in Multiple Cities (local)]) has a lost focus. Any help to keep the focus in same control to allow inputting more values.


Solution

  • May seem out of context, but believe me, this is what you really need.


    Jörn Zaefferer's jQuery AutoComplete was a wonderful plugin for autocomplete(Read this).
    But its now deprecated and so, it would be very hard to maintain that for any project for the latest versions of jQuery.

    Here is what Jörn Zaefferer has to say

    Note (2010-06-23): This plugin is deprecated and not developed anymore. Its successor is part of jQuery UI, and this migration guide explains how to get from this plugin to the new one. This page will remain as it is for reference, but won’t be updated anymore.

    So its better to switch to jQUery UI - AutoComplete.