Author Topic: Navigation problem with autocomplete  (Read 2567 times)

stevejacobsen

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 46
    • View Profile
Navigation problem with autocomplete
« on: June 16, 2016, 08:57:20 pm »
I'm having troubles with the up/down keys when the autocomplete list is presented. I can click and select items from the list with a mouse but when I use the down arrow to navigate the list goes away. I was thinking that it was because it is triggering off the .focus event. I changed it to .edit and was able to navigate the list but then I was locked in to the edit field.

Quote
   var autoCompleteEditor = function (ui) {
        var $inp = ui.$cell.find("input");

        //initialize the editor
        $inp.autocomplete({
            source: "/utilities/ajax_get_catalog_autocomplete_JSON.php",
            selectItem: {on: true}, //custom option
            highlightText: {on: true}, //custom option
            minLength: 0
        }).focus(function () {
            //open the autocomplete upon focus               
            $(this).autocomplete("search", "");
        });
    }
    //define colModel
    var colM = [
        {title: "Part", width: 120, dataIndx: "Part", align: "left", cls: 'result',
            editor: {
                type: "textbox",
                init: autoCompleteEditor,
            },
            filter: {type: 'textbox', condition: 'begin', listeners: ['keyup']}
        },

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Navigation problem with autocomplete
« Reply #1 on: June 17, 2016, 08:46:07 pm »
It's the same code as in demo: http://paramquery.com/pro/demos/editing_custom

I don't see this issue in the demo, could you please share a jsfiddle.

Do you face this problem in any particular browser / version?