Toolbar tabs when clicked is not working properly.

Created on 11 June 2025, about 2 months ago

Problem/Motivation

Toolbar tabs aren’t working properly, see the unexpected behavior below.

Steps to reproduce

1. Install a fresh Drupal 11.x site
2. Log in as admin
3. Click on the toolbar menu tabs — the clicked tab should become active, and the others should be deactivated, sometimes the clicked tab even open the sub menu.

Observed behavior:
- Sometimes it works, but most of the time it doesn’t
- The expected tab is not activated consistently

Expected beheavior
- The clicked tab should be activated
- The other tabs should be deactivated
- The submenu (subtree) should appear

Proposed resolution

Sometimes, for an unknown reason, Backbone does not trigger or update the activeTab model correctly.
To address this, I propose manually triggering the change event when the user clicks a tab.

We can trigger this event inside the onTabClick function in the ToolbarVisualView.js file.
Right after setting the model, similar to how it’s already triggered when the page loads:
this.model.trigger('change:activeTab');

Remaining tasks

User interface changes

🐛 Bug report
Status

Active

Version

11.0 🔥

Component

toolbar.module

Created by

🇧🇷Brazil joaopauloc.dev

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