Declined
Last Updated: 11 Oct 2022 12:47 by ADMIN
Michael
Created on: 06 Oct 2022 16:47
Category: Switch
Type: Bug Report
0
Cannot set Focus to Switch

I have tried numerous ways of calling the .focus() on the Switch jquery object as the control has no built-in focus metod.

I have not been able to find any information to get around this issue. What am I missing

2 comments
ADMIN
Dimitar
Posted on: 11 Oct 2022 12:47

Hi Michael,

Thank you for your feedback. I am glad that you have managed to find a way to set focus to the Switch. The same approach is shown on Switch's Keyboard support demo:

            if (e.altKey && e.keyCode === 87 /* w */) {
                $("#switch").data("kendoSwitch").wrapper.focus();
            }

Regards,
Dimitar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Michael
Posted on: 06 Oct 2022 18:54
I finally found that I can reference the wrapper off of the data("kendoSwitch") object and set the focus(). Would be nice if this was in the documentation somewhere.