Nested horizontal tabs break parent default tab selection

Created on 14 July 2025, about 8 hours ago

Problem/Motivation

If a form includes nested horizontal tabs (e.g. paragraph tabs within node tabs), the child tabs break the default open state of the parent ones.

This issue only surfaces in edge cases when the default tab is configured to be something other than the 1st tab.

Steps to reproduce

  1. Install the Field Group and Paragraphs modules.
  2. Create a Paragraph type with two text fields.
  3. Go to the Paragraph type’s Manage Display page:
    • Add a Tabs group (horizontal), with two Tab sub-groups.
    • Place one text field under each tab.
  4. Create a new Content type with one Paragraph field that allows only the paragraph type created above.
  5. Go to the Content type’s Manage Display page:
    • Add a Tabs group (horizontal), with two Tab sub-groups.
    • Place the Title field under the 1st tab, and the Paragraph field under the 2nd.
    • Set the 2nd tab to be open by default
  6. Open the node add form for that content type.

Observed behavior: The 1st tab is open by default, not the configured 2nd tab.

Proposed resolution

Update formatters/tabs/horizontal-tabs.js to use a stricter selector, so nested tab structures don't interfere with the parent's default state. Change :hidden.horizontal-tabs-active-tab to > :hidden.horizontal-tabs-active-tab.

Remaining tasks

Write patch. Review. Test.

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Active

Version

4.0

Component

Miscellaneous

Created by

🇧🇷Brazil bember

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024