Dropdown not working in frontend with modern horizontal toolbar/Gin theme

Created on 15 November 2021, over 2 years ago
Updated 10 May 2023, about 1 year ago

Problem/Motivation

The Admin toolbar dropdown is not working in the frontend, with the modern horizontal toolbar.

Thats seems to be solved if you change position from absolute to fixed on the ul.

.toolbar-tray-horizontal ul li.menu-item--expanded.hover-intent ul

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇩🇪Germany Corn696 Flensburg

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Hi,

    Tried to reproduce the issue on local, but not get any issue in admin toolbar dropdown with claro and gin theme also.
    attached a video: dropdown-gin.mp4

    please describe more info about the issue.

  • 🇫🇮Finland HeikkiY Oulu

    We received a similar report from our users that the Admin toolbar hover does not work.

    So far I have been able to reproduce this with Google Chrome and Mozilla Firefox and a restricted user role.

    The toolbar works fine with the Administrator role with latest Google Chrome version.

    The symptoms are the same: The hover does not work but if you click on the menu item, the dropdown appears but it also reloads the page and it's impossible to click on the menu item. No JS errors visible.

    Tested with Claro, Drupal 9.5.8 and Admin toolbar 3.2.0.

  • 🇳🇱Netherlands absoludo

    I can confirm the bug.
    I'm running Drupal `9.5.*` & Admin Toolbar `3.3.0`.

  • 🇫🇮Finland HeikkiY Oulu

    It seems like I was able to solve the problem in our case.

    We have some customizations for Workbench access and we have limited user access to certain menu items.

    Originally when we implemented the feature we included the admin_toolbar/toolbar.tree library which made the trees work. But I noticed that I also needed to include the admin_toolbar/toolbar.tree.hover library also for the limited user role. In our example the code looks like this:

    // Attach Admin toolbar library to make dropdowns work.
    $items['workbench']['#attached']['library'][] = 'admin_toolbar/toolbar.tree';
    $items['workbench']['#attached']['library'][] = 'admin_toolbar/toolbar.tree.hover';
    

    This change seems to fix the hover for us. So maybe the problem lies in the library versions and that the toolbar.tree.hover library gets loaded also.

  • 🇨🇦Canada adriancid Montreal, Canada

    Can you check if the last release fix the issue?

Production build 0.69.0 2024