This is a migrated thread and some comments may be shown as answers.

Autocomplete dropdown doesn't open when grammatically insert characters in the input control

1 Answer 56 Views
AutoComplete
This is a migrated thread and some comments may be shown as answers.
Ron
Top achievements
Rank 1
Ron asked on 22 Oct 2013, 12:48 AM
Hello,

I am using the Autocomplete control with a text input. Users can enter characters in two ways, either directly type it in or use an on screen keyboard and click on keys to inserts characters in the text input control (multi-language keyboards). When I type the characters directly in the textbox the autocomplete works fine and displays the list of characters. 

In the on screen keyboard mode, I trigger both Keypress and Keydown events for the input control by clicking on each key on keyboard picture and pass the characters through those events. As a result the characters appear correctly and I even can see that autocomplete is triggered and queries the server and obtains a list of words but the list never shows up and there is no dropdown.

Here is the function I use to insert characters by passing character code:
function addcharto(code) {
    var control = $('#SearchWord');
    var ed = $.Event("keydown");
    var ep = $.Event("keypress");
    ed.which = code;
    ep.which = code;
    control.trigger(ed);
    control.trigger(ep);
}
I used both events to make sure I am covering every possibilities.
Could you let how can I force the autocomplete to display the list of choices that it is obtained?

Thanks
Ron

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 23 Oct 2013, 04:20 PM
Hi Ron,

I have managed to reproduce the issue that you are describing. As this is not currently supported I would suggest you to use the search() method of the AutoComplete widget, to search for the string that is already entered, so the dropdown list with the respective suggestions will be shown.
 
Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
AutoComplete
Asked by
Ron
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or