Background
I have a Kendo autocomplete that should display a list of "recently searches" on focus. To accomplish this, I wired up a focus event, where I autocomplete.search(''). This reliably displays the default list (whole list on local datasource and whatever my server returns on empty string with a remote datasource). However, we also wish to enable the suggest option, so upon focus, the autocomplete empty searches, and suggests the first option.
IE 11 Issue
This is where the first issue occurs. On IE11, our first search is triggered, and does as anticipated (shows list, and suggests the first option). However, a second search is also fired, but uses the suggestion as the search criteria.
This can be demonstrated in an isolated Dojo: https://dojo.telerik.com/ekIXopar by selecting the autocomplete input.
All Browsers Issue - Search Triggered by Modifier Keys
On all browsers, even non-IE11, pressing modifer keys (eg: ctrl, shift, caps-lock, etc...) will immediately trigger a search with whatever is in the textbox (including suggestions). This causes issues when combined with the suggest is true. The real-world use case for this was having our users go to paste in something:
1. The focus search and suggest fills in the textbox with the first search result
2. The user presses ctrl in preparation to ctrl-v paste.
3. Between ctrl and v, the autocomplete will trigger another search with the now suggested text as criteria, thus narrowing the result to only the 1, AND offsetting the selection by 1 at the start of the text (ie: all but the first letter is highlighted).
4. When the user finishes the paste, the result is the first letter of the original suggestion and whatever they pasted.
This can also be demonstrated in the above dojo. Simply select the input and press and release the ctrl button. You should immediately see the first character get unselected, and "Albania" should become the only auto-suggestion result.
Possible Causes
Digging into the Kendo AutoComplete source, the keydown listener is picking up the control key as it's own keydown. From here, we have some if/elses that perform certain logic such as moving the selection up/down. However, our example of ctrl (keycode 17), falls into the else logic, which triggers a search based on the input value.
Possible Solutions
1. If I put the focus listener before the autocomplete call, I remove the initial issue... however, the fundamental issue with modifier keys triggering searches remains. This is problematic as pressing control (and other modifier keys), imho, shouldn't directly change the user's search results.
2. Add additional listeners to filter our these keys before the kendo autocomplete init, and stop the events from getting to kendo (stopImmediatePropagation). May introduce some other issues...
Question
Is there a solution to the IE11 bug? And for modifier searches, is there better work-arounds, or is this something that Kendo could address in an update?