Completed
Last Updated: 06 Oct 2021 11:10 by ADMIN
Release R3 2021 SP1
Dominik
Created on: 15 Sep 2021 11:13
Category: TabStrip
Type: Bug Report
5
Maximum callstack exceeded error in TabStrip with nested tabs

The issue is replicated in R3 2021 only. 

<telerik:RadTabStrip runat="server"  ID="RadTabStrip1" >
    <Tabs>
        <telerik:RadTab Text="Tab 1">
            <Tabs>
                <telerik:RadTab Text="fail"></telerik:RadTab>
            </Tabs>
        </telerik:RadTab>
        <telerik:RadTab Text="Tab 2"></telerik:RadTab>
        <telerik:RadTab Text="Tab 3"></telerik:RadTab>
    </Tabs>
</telerik:RadTabStrip>

Solution from Admin:

Place the load/script below somewhere under the ScriptManager. It can be added in the MasterPage if needed:

<script>
    Sys.Application.add_init(function fixTabStrip() {
        if (Telerik && Telerik.Web && Telerik.Web.UI && Telerik.Web.UI.RadTabStrip) {
            Telerik.Web.UI.RadTabStrip.prototype._childInserted = function (index, tab, owner) {
                this._allTabs = null;

                if (this._cachedSelectedTab) {
                    owner._setSelectedIndex(this._cachedSelectedTab.get_index());
                    this._cachedSelectedTab = null;
                }

                if (tab._cachedSelected) {
                    owner._setSelectedIndex(index);
                    tab._cachedSelected = false;
                }

                Telerik.Web.UI.RadTabStrip.callBaseMethod(this, "_childInserted", [index, tab, owner]);

                if (tab.get_isBreak()) {
                    var breakElement = document.createElement("li");
                    breakElement.className = "rtsBreak";
                    owner.get_childListElement().insertBefore(breakElement, tab._element.nextSibling);
                }

                //if (tab.get_parent() && tab.get_parent() instanceof Telerik.Web.UI.RadTab && tab.get_parent().get_selected()) {
                //    $telerik.$(tab.get_parent().get_levelElement()).removeClass("rtsHidden");
                //}
            }
        }
    });
</script>

0 comments