Problem/Motivation

When switching between different administration toolbar trays (for example: Manage → Shortcuts → Admin), the first click on the target tray only closes the previously open tray and does not open the target tray. A second click is required to open it. This is a client-side UX issue in the core toolbar behavior.

Steps to reproduce

  1. Log in as an administrator.
  2. Open any admin page where the toolbar is visible.
  3. Clear browser storage using DevTools:
    localStorage.clear();
    sessionStorage.clear();
  4. Hard refresh the page.
  5. Click Manage — the tray opens.
  6. Click Shortcuts — the tray opens.
  7. Click Admin — the tray does not open.
  8. Click Admin again — the tray opens.

This reproduces consistently from a fresh state.

Proposed resolution

Adjust the toolbar tray click handler logic so that when a different tray is clicked while another tray is active, the currently active tray is closed and the target tray is opened within the same click event, instead of returning early after closing the active tray.

Remaining tasks

  • Confirm expected behavior with UX maintainers.
  • Update toolbar JavaScript logic.
  • Add a JavaScript test or manual test coverage if applicable.

User interface changes

Toolbar tray switching will open the selected tray on the first click instead of requiring a second click.

Introduced terminology

None.

API changes

None.

Data model changes

None.

Release notes snippet

N/A – user interface bug fix.

Comments

quietone’s picture

Changing tags per Issue tags field and Issue tags -- special tags

smustgrave mentioned in Slack that they are 99% sure this is a duplicate of an issue in the RTBC queue.

quietone’s picture

Version: 11.3.x-dev » main

Also, in Drupal core changes are made on the main branch first, and are then back ported as needed according to the Core change policies. The version the problem was discovered on should be stated in the issue summary Problem/Motivation section. Thanks.

angel_devoeted’s picture

This looks like a duplicate of #3529674

cilefen’s picture

Status: Active » Postponed (maintainer needs more info)

I agree this looks like a duplicate.

quietone’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)
Related issues: +#3529674: Toolbar tab behavior is inconsistent when clicked.

Closing as a duplicate per the last two comments and my reading of the issues.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.