Duplicated
Last Updated: 01 Jan 2021 10:23 by ADMIN
Boris
Created on: 27 Dec 2020 12:54
Category: TabStrip
Type: Bug Report
1
Wrong appended tab content after removing the first tab

Hi,

I combined code form two examples found on your site in order to reproduce the bug.

The original example describes how to append tab to the tabStrip:

https://docs.telerik.com/kendo-ui/api/javascript/ui/tabstrip/methods/append

dojo editor: https://dojo.telerik.com/alEGIcod

I added this line

tabStrip.remove("li:first");

that was copied from the other example about removing tab:

https://docs.telerik.com/kendo-ui/api/javascript/ui/tabstrip/methods/remove)

Just "li:last" I replaced by "li:first"

Now the appended tab has content of the second tab "Content 2" instead of "Appended Tab 1 content".

The bug reproduced.

I think that the problem is that the both tabs have the same id: id="tabstrip-tab-2"

 

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>Kendo UI Snippet</title>

    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2020.3.1118/styles/kendo.default-v2.min.css"/>

    <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2020.3.1118/js/kendo.all.min.js"></script>
</head>
<body>

<div id="tabstrip">
    <ul>
        <li>Tab 1</li>
        <li>Tab 2</li>
    </ul>
    <div>Content 1</div>
    <div>Content 2</div>
</div>

<script>
    var tabStrip = $("#tabstrip").kendoTabStrip().data("kendoTabStrip");
    tabStrip.remove("li:first"); // added line
    tabStrip.append(
        [{
            text: "<b>Appended Tab 1</b>",
            encoded: false,
            content: "Appended Tab 1 content",
        },
]
    );
</script>
</body>
</html>

  
Duplicated
This item is a duplicate of an already existing item. You can find the original item here:
1 comment
ADMIN
Plamen
Posted on: 01 Jan 2021 10:23

Hello,

The issue seems to be connected to an already reported bug that is already fixed and the fix is available in the Latest Internal Build that can already be found in your Telerik account.

If you have further questions please let me know.

Regards,
Plamen
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/.