Submenu flyout on hover broken in IE / Edge

Created on 6 April 2020, over 4 years ago
Updated 2 June 2024, 6 months ago

There is an issue in ultimenu.css preventing the showing of the submenu on hover in Microsoft browsers IE11 and Edge.

It took me hours to find out the reason for this, so I'm posting this issue for anyone else with the same issue.

It's actually a bug in IE / Edge, not in this module. The problem is this block, starting at line 290:

.ultimenu li:hover > .ultimenu__flyout,
.ultimenu li a:focus + .ultimenu__flyout,
.ultimenu li .ultimenu__flyout:focus-within {
  display: block;
  margin-top: 0;
  max-height: 100%;
  overflow: visible;
  opacity: 1;
  transition-delay: 0s;
  visibility: visible;
}

The :focus-within pseudo class is not supported in IE and Edge, and surprisingly the browsers just ignore the whole block - so the selector .ultimenu li:hover > .ultimenu__flyout is ignored as well. To make things worse, there's not even an error message in the dev console.

I found some information about this issue here: https://stackoverflow.com/questions/50788545/a-focus-within-workaround-f...

My workaround then was quite simple - just make two separate code blocks like this:

.ultimenu li:hover > .ultimenu__flyout,
.ultimenu li a:focus + .ultimenu__flyout {
  display: block;
  margin-top: 0;
  max-height: 100%;
  overflow: visible;
  opacity: 1;
  transition-delay: 0s;
  visibility: visible;
}
.ultimenu li .ultimenu__flyout:focus-within {
  display: block;
  margin-top: 0;
  max-height: 100%;
  overflow: visible;
  opacity: 1;
  transition-delay: 0s;
  visibility: visible;
}
Feature request
Status

Closed: won't fix

Version

2.0

Component

Code

Created by

🇩🇪Germany majusz

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.

  • 🇮🇩Indonesia gausarts

    2.x was retired.
    3.x was out with some mobile fixes.

    IMHO IE was no longer supported by Miscrosoft nor Drupal 9+.

    Feel free to re-open if still an issue. Be sure to mark it 3.x.

    Thank you.

Production build 0.71.5 2024