Problem/Motivation

Hover not working as expected after switching from vertical to horizontal.

Steps to reproduce

Using the Seven theme for the Admin Theme, when the admin toolbar is horizontal, the hover dropdown menus work as expected. When I change the admin toolbar to vertical, then click on a menu item, the menu item loads the page as expected. Then when I change back to horizontal toolbar, the hover dropdown items do not work until I reload the page. I have tested with aggregation on and off (both css/js), but the problem persists either way.

Comments

thalemn created an issue. See original summary.

Anonymous’s picture

I am not able to reproduce this issue.

thalemn’s picture

I just installed a fresh Drupal 9.4.8 with admin toolbar 3.2.1 using PHP 8.0
No other modules are installed.
I'm using a local install with Docker and ddev (all up-to-date).
Steps to produce the issue:

  1. Hover over horizontal toolbar links: works as expected
  2. Switch to vertical toolbar
  3. Click on link in vertical toolbar (Configuration for example)
  4. Switch back to horizontal toolbar
  5. Hover over horizontal toolbar links: nothing happens
Harish1688’s picture

StatusFileSize
new96.07 KB

Hi,
Tried to replicate the issue on local with same Drupal 9.4.8 with admin toolbar 3.2.1. and testing the things steps wise as provided but not facing any issue on hover state when switch vertical to horizontal toolbar mode. Hover working fine and by access by tabs focus also working fine.

can you please provide more info or (UI) to issue, so would be able to generate.

nagsept3’s picture

Yes. Tested at local. not able to reproduce the error

thalemn’s picture

Demo of hover issue

Drupal 9.5.10
PHP 8.1
No other modules installed/enabled other than Drupal 9
Theme: Stark
Admin Theme: Claro

DDEV local install

Harish1688’s picture

StatusFileSize
new2.01 MB

Hi @thalemn,

Tried with same info as you provided to reproduced the issue on local. but not able to reproduce the issue on local, it's working fine.
attached a GIf for reference.

issue image

thalemn’s picture

@Harish1688

Thanks for providing the gif.

There appears to be a step missing in your gif demo: when you switch from horizontal to vertical, click on an admin link to open the page (for example, click on Block layout link to open the Block layout page (/admin/structure/block). After that page opens (with the admin toolbar in the vertical position), switch the toolbar back to horizontal. Then the horizontal links do not hover for me.

Can you please try again?

swatidhurandhar’s picture

Status: Active » Needs review
StatusFileSize
new4.36 MB
new1.87 KB

Hi, I was able to reproduce the issue with above steps. Please find the attached patch for the fixes.
Thanks

pemanamgay’s picture

StatusFileSize
new1.22 MB

I've tested this issue and I am able to reproduce it and I've applied the #9 patch and it is fixing the issue

pemanamgay’s picture

StatusFileSize
new4.23 MB
thalemn’s picture

Thank you. I have applied the patch in #9 and the hover issue has been fixed.

swatidhurandhar’s picture

StatusFileSize
new1.87 KB

Just updated the patch name from #9.

keshavv’s picture

Version: 3.2.1 » 3.4.2
StatusFileSize
new1.73 KB

I can reproduce the issue.

Set the menubar vertical.
Reload the page.
Change the menubar position to horizontal and try to hover on the menu without reloading the screen.
Hover will not work.

However, The given patch failed to apply to me on version 3.4 so I have created a new one for it.
Please review.
Thank you.

sandeep_k’s picture

StatusFileSize
new1012.3 KB
new1.59 MB

@keshavv, Tested the shared Patch 3320479-14.patch on Drupal version- 9.5.11. The patch was applied successfully and looks good to me.
Testing Steps:

  1. Drupal 9.5> Add the Admin Toolbar module.
  2. Switch to the vertical toolbar.
  3. Click on the link in the vertical toolbar (any module link for example).
  4. Switch back to the horizontal toolbar.
  5. Hover over horizontal toolbar links to reproduce this issue.
  6. Download the shared patch and Apply.
  7. Reverify this issue by following the above steps.

Testing Results:
After applying the patch, the hover is working fine while we switch back to the horizontal toolbar from the vertical toolbar. RTBC++

kanchan bhogade’s picture

StatusFileSize
new909.56 KB
new2.81 MB

Hi,
I've tested the Patch 3320479-14.patch on Drupal version- 9.5.12.
The patch was applied successfully...

Followed the same steps as mentioned in #15

Testing Results:
The hover functionality is working fine when the user switches back to the horizontal toolbar from the vertical toolbar.
RTBC++

attaching videos

Keeping in "needs review" for code verification

dydave’s picture

Status: Needs review » Closed (outdated)

No activity on issue for more than a year.

Could you please try updating to the latest stable version and test if the problem still occurs?
Maybe this issue was fixed in other interfering modules or themes?

Closing issue as Outdated, for now.

Thanks everyone for all the work!