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

open MultiSelect on tab focus

2 Answers 611 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
Darren
Top achievements
Rank 1
Darren asked on 10 Oct 2018, 01:50 PM
Is there a good way to trigger the multiselect open event when you tab into the control from a previous input. Currently it does open when you click on the element or if you tab into it and type or press the down key. However i would like to trigger the open even on focus. I have tried the following just to log the event however it does not seem to trigger the focus event until i start to type. 

$("select[data-role=multiselect]").each(function () {
    var widget = $(this).getKendoMultiSelect();
    widget.input.on("focus", function () {
        console.log(this);
    });
});


2 Answers, 1 is accepted

Sort by
0
Accepted
Ivan Danchev
Telerik team
answered on 11 Oct 2018, 12:44 PM
Hello Darren,

You can call the MultiSelect's open API method in the focus event handler. This way the widget's popup gets open on tabbing from an input into the MultiSelect. Here's a dojo example.

Regards,
Ivan Danchev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Darren
Top achievements
Rank 1
answered on 11 Oct 2018, 01:34 PM
Thanks Ivan, 

Wrapping my function in $(document).ready() made it work.
Tags
MultiSelect
Asked by
Darren
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Darren
Top achievements
Rank 1
Share this question
or