Unplanned
Last Updated: 19 Jul 2023 11:08 by ADMIN
Kristoffer
Created on: 13 Jul 2023 07:23
Category: TabStrip
Type: Bug Report
0
When keyboard navigation is enabled Tabs keep focus even after focusing other tabs

Code to replicate the issue:

<telerik:RadTabStrip RenderMode="Lightweight" ID="RadTabStrip1" runat="server" SelectedIndex="0">
    <KeyboardNavigationSettings CommandKey="Alt" FocusKey="M" />
    <Tabs>
        <telerik:RadTab Text="Examples">
        </telerik:RadTab>
        <telerik:RadTab Text="Configurator">
        </telerik:RadTab>
        <telerik:RadTab Text="Quick Start">
        </telerik:RadTab>
        <telerik:RadTab Text="Help">
        </telerik:RadTab>
        <telerik:RadTab Text="Purchase">
        </telerik:RadTab>
    </Tabs>
</telerik:RadTabStrip>

1 comment
ADMIN
Attila Antal
Posted on: 19 Jul 2023 11:08

Hello Kristoffer,

Thank you for reporting the issue. 

We have a workaround for this issue until a fix is released, please see below:

Workaround

Place this JavaScript code anywhere on the Page, but only after the ScriptManager declaration.

<script>
    (function () {
        try {
            // store the original method in a variable
            var original_initializeKeyboardNavigation = Telerik.Web.UI.RadTabStrip.prototype._initializeKeyboardNavigation;

            // override the original method
            Telerik.Web.UI.RadTabStrip.prototype._initializeKeyboardNavigation = function () {
                // the override
                $(this.get_element()).on('focus', function (e) {
                    $(this).find('.rtsFocused').removeClass('rtsFocused');
                });
                // call the original method
                original_initializeKeyboardNavigation.call(this);
            }
        } catch (e) {
            // Oh no, Telerik.Web.UI.RadTabStrip is not instantiated
        }
    })()
</script>

Regards,
Attila Antal
Progress Telerik

Heads up! Telerik UI for ASP.NET AJAX versions for .NET 3.5 and 4.0 are retired. Progress will continue shipping assemblies compatible with .NET 4.5 and later. See whether this affects your apps in this article.