Home › Forums › WoodMart support forum › Gutenberg: duplicated Tabs blocks share tab titles when editing

Gutenberg: duplicated Tabs blocks share tab titles when editing

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #731389

    Moatasem Gamal
    Participant

    Hello WoodMart team,

    When I duplicate a normal WoodMart **Tabs** block in Gutenberg, changing a tab title in one component also changes the corresponding title in the duplicated component.

    Steps to reproduce:

    1. Add a WoodMart Tabs block and enter some tab titles.
    2. Use Gutenberg’s **Duplicate** command on the entire Tabs block.
    3. Change the first tab’s title in either component.
    4. The first tab’s title in the other component changes too.

    **Expected:** Each duplicated Tabs component should have independently editable titles.

    **Actual:** Editing a title affects both components.

    The installed theme is 8.4.1. Source inspection of the 8.6.4 shows the same title-update logic.

    The title handler copies the tabTitles array but directly mutates the nested title object. Those objects can remain shared after duplication. This behavior was reproduced using the actual Gutenberg duplication function and WoodMart title handlers in a JavaScript harness.

    An immutable update should resolve this:

    `js
    setAttributes({
    tabTitles: attributes.tabTitles.map((tab, i) =>
    i === index ? { …tab, title: newTitle } : tab
    ),
    });
    `

    Saving and reloading the editor before editing the duplicated titles appears to provide a temporary workaround.

    Please include a permanent fix in WoodMart so duplicated Tabs components can be edited independently.

    #731393

    Serg Sokhatskyi
    Keymaster
    Xtemos team

    Hi there,

    Thank you for the detailed report, including the steps to reproduce, your source analysis and the suggested fix. We appreciate it.

    We will check this issue and fix it in one of our next theme updates. Until then, you can keep using the workaround you found: save and reload the editor after duplicating the Tabs block, and then edit the titles.

    Kind regards,
    XTemos Studio

    #731396

    Moatasem Gamal
    Participant

    Hi Serg,

    Thank you for your response and for confirming that the issue will be investigated and addressed in a future update.

    I appreciate your support.

    Kind regards,
    Moatasem

Viewing 3 posts - 1 through 3 (of 3 total)