telerik / kendo-ui-core

An HTML5, jQuery-based widget library for building modern web apps.
http://www.telerik.com/kendo-ui
Other
2.54k stars 1.91k forks source link

DropDownList popup does not close on pressing Enter after navigating between inputs to refocus the DropDownList #7163

Open nelito987 opened 1 year ago

nelito987 commented 1 year ago

Bug report

When navigating between inputs and after using Shift+Tab for focusing on a previous input the DropDownList popup does not close on pressing 'Enter' key.

Reproduction of the problem

  1. Open Dojo
  2. Focus the text input
  3. Press Tab to focus the DropDownList
  4. Press Shift+Tab to focus the text input
  5. Press again Tab to focus the DropDownList
  6. Press Alt+Down Arrow to expand the dropdown
  7. Press the Down Arrow to select an option in the dropdown
  8. Press Enter key

Current behavior

The popup does not close. If we directly focus the DropDownList and follow steps 6-8 the popup will close.

Expected/desired behavior

The DropDownList should close when pressing the 'Enter' key.

Environment

nelito987 commented 1 year ago

Possible workaround:

open: function(e){ setTimeout(function(){ $('.k-popup').on('keydown', function(e){ if(e.keyCode == 13){ $("#products").data('kendoDropDownList').close() } }) }) }, Dojo - https://dojo.telerik.com/@NeliKondova/opENeroV