Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Kendo AutoComplete] - While typing option from suggestion list is automatically getting focused and selected on enter press/text select #4428

Closed
jignesh-dalal opened this issue Aug 7, 2018 · 1 comment
Labels

Comments

@jignesh-dalal
Copy link

jignesh-dalal commented Aug 7, 2018

Reproduction of the problem

Demo: https://dojo.telerik.com/@jignesh.h.dalal/IPiSugAH

Issue 1

  1. Navigate to above URL using Google Chrome browser.
  2. Open DevTools and set Network connection to "Fast 3G"
  3. Click on Run to start the demo.
  4. Now, quickly type "Choco" and it variations 2-3 times and observe that first item under suggestions suddenly gets highlighted w/o pressing arrow keys. Press Enter key and the value gets selected which is an unexpected behavior since the actual search term is lost and replaced by an item which user did not selected in first place.

Issue 2

  1. Follow steps 1-4 mentioned in Issue 1.
  2. Now, focus out of control to close suggestion box.
  3. Again, focus in on control and press down arrow key to open suggestion box. Make sure none of the item is highlighted/selected when the box opens.
  4. Now, select the partial search text using keyboard (Ctrl+A) and observe that first item in suggestion box gets highlighted/selected upon pressing Enter key.

Expected/desired behavior

Items under suggestion box should not automatically get highlighted/selected based on partial search text or by just selecting the partial search text using keyboard.

Workaround

Uncommenting following lines under dataBound handler in demo seems to fix Issue 1:

Line 1
$("li", e.sender.ul).removeClass("k-state-focused").removeAttr("id");

Line 2
$("#products_listbox").data("kendoStaticList")._current = null;
OR
e.sender.ul.data("kendoStaticList")._current = null;

Environment

  • Kendo UI version: 2018.3.911
  • jQuery version: 1.12.4
  • Browser: Chrome 67.0.3396.99

AutoCompleteIssues.zip

@Dimitar-Goshev
Copy link
Contributor

@jignesh-dalal Thank you for this report. I increased the priority of the related issue you previously found and added more detailed steps for reproduction. The issue is still reproducible. I am closing this issue as duplicate. You may track the other issue's progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants