Unplanned
Last Updated: 02 Jun 2023 15:40 by ADMIN
Andre' Hazelwood
Created on: 26 May 2023 21:01
Category: MultiSelect
Type: Feature Request
1
MultiSelect Escape character should not bubble event

Similarly to the feedback listed in https://feedback.telerik.com/kendo-jquery-ui/1560733-multiselect-keyboard-events-bubble-although-already-handled#:~:text=The%20approach%20described%20in%20order%20to%20prevent%2Foverwrite%20the,well%3A%20kendo.ui.MultiSelect.fn._keydown%20%3D%20function%28e%29%20%7B%20e.preventDefault%20%28%29%20%7D%3B

I am exploring using a multiselect box within a window.  If I choose to not allow the multiselect to autoClose, hitting the escape key will close the multiselect, but the event will continue to bubble up and will close the window.  Ideally, the multiselect should close its panel, but the window it is embedded on should not.

One solution to this problem is to add a handler for the close event on the window, however there is currently no way to determine if the close event is being triggered by clicking the close button on the window, or from an escape character (e.userTriggered does not go far enough to differentiate).  I would like the user to be able to click the close button manually to close the dialog, but not necessarily use the keyboard Escape key.  See:  https://docs.telerik.com/kendo-ui/api/javascript/ui/window/events/close

The following solution as mentioned in the feedback link above, can be used to stop the propagation of the Escape key globally, but this then breaks all other keyboard actions (which is bad from a usability standpoint).  Is there any way to add this functionality?  From looking at the source (which we have as part of our subscription), simply adding e.stopPropagation() when responding to the ESC key in the _keydown function of kendo.multiselect.js would be enough to fix this issue.

kendo.ui.MultiSelect.fn._keydown = function (e) {
   if (e.which === 27) {
      e.stopPropagation();
   }
}

Thanks.

1 comment
ADMIN
Patrick | Technical Support Engineer, Senior
Posted on: 02 Jun 2023 15:40

Hi Andre',

Thank you for the feedback and suggestion regarding the Kendo UI MultiSelect's functionality.

I have changed the item's status to Unplanned which means that it is a valid feature request not scheduled for implementation yet. Depending on the popularity the issue gains in the community with votes, we will consider it for implementation in a future release.  

Regards,
Patrick | Technical Support Engineer, Senior
Progress Telerik

As of R2 2023, the default icon type will be SVG instead of Font. See this blogpost for more information.