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
- Log in as an administrator.
- Open any admin page where the toolbar is visible.
- Clear browser storage using DevTools:
localStorage.clear(); sessionStorage.clear(); - Hard refresh the page.
- Click Manage — the tray opens.
- Click Shortcuts — the tray opens.
- Click Admin — the tray does not open.
- 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
Comment #2
quietone commentedChanging 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.
Comment #3
quietone commentedAlso, 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.
Comment #4
angel_devoeted commentedThis looks like a duplicate of #3529674
Comment #5
cilefen commentedI agree this looks like a duplicate.
Comment #6
quietone commentedClosing as a duplicate per the last two comments and my reading of the issues.