Skip to content

V2.15.5 - Fix mega menu opening from anywhere along the header - #143

Merged
jasperf merged 1 commit into
mainfrom
v2.15.5
Jul 23, 2026
Merged

V2.15.5 - Fix mega menu opening from anywhere along the header#143
jasperf merged 1 commit into
mainfrom
v2.15.5

Conversation

@jasperf

@jasperf jasperf commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Version: 2.15.5

Fixes a hover-target regression in the desktop header where the Services mega menu opened from anywhere along the header width, including far to the right of the Contact item next to the Mastodon, GitHub, and search icons. The root cause was an interaction between two existing rules in resources/css/app.css: section 3.4 sets the mega <li> to position: static so the panel can render full-bleed against the <nav>, which leaves the item with no positioned ancestor of its own, so the generic dropdown hover bridge in section 3.3 (left: 0; right: 0; top: 100%) resolved its insets against the full-width <nav> and stretched an invisible 8px hover target across the entire header. The fix excludes the mega item from the generic bridge and gives it a dedicated replacement anchored to its link wrapper, with negative insets that restore the item's px-4 padding box so the trigger is exactly as wide as the visible menu item. The panel's own upward bridge is left full-width, which is safe because .submenu-list is pointer-events: none while closed and therefore only becomes a hover target once the menu is already open. Theme version is bumped to 2.15.5.

Mega Menu Hover Bridge Fix:

  • Added :not(.mega-menu) to the generic dropdown bridge selector (#menu .group.relative:has(> ul[role="menu"])::after) in section 3.3, preventing it from applying to the statically positioned mega item.
  • Introduced a scoped replacement bridge in section 3.4 on #menu .my-menu-item.mega-menu > div::after, with the wrapper set to position: relative, left/right: -1rem to restore the li's horizontal padding, and height: 2rem to span the gap down to the panel.
  • Retained the panel's upward ::before bridge unchanged, since it only becomes interactive after the panel opens; regular dropdowns (About, Themes, Blog, Contact) are unaffected by either change.

Verification:

  • Validated with Playwright at 1024, 1280, 1440, and 1920 viewport widths: hovering to the right of Contact at every height within and below the header bar leaves the panel closed, Services still opens on hover, and the pointer can still travel from Services into the panel without it closing.

Release Metadata and Documentation:

  • Bumped the theme version from 2.15.4 to 2.15.5 in style.css and readme.txt.
  • Added a [2.15.5] entry to CHANGELOG.md documenting the root cause, both halves of the hover bridge, and the verification matrix.

Note: the changelog entry references documentation updates to docs/nynaeve/SERVICES-MEGA-MENU.md, but that file is not among the changed files in this branch — the doc change should either be included or the changelog line dropped.

Files Changed:

The Services panel opened whenever the pointer touched the bottom edge of
the header, including well to the right of Contact by the social icons.

The mega <li> is position:static so the panel can be full-bleed against
the <nav>, which left it with no positioned ancestor of its own. The
generic dropdown hover bridge (left:0; right:0; top:100%) therefore
resolved against the full-width <nav>, stretching an invisible 8px hover
target across the entire header instead of sitting under SERVICES.

Exclude the mega item from the generic bridge and give it a replacement
anchored to its link wrapper, with negative insets restoring the li's
px-4 box so the trigger is exactly as wide as the visible item. The
panel's own upward bridge stays full width, which is safe because the
panel is pointer-events:none while closed.

Verified with Playwright at 1024/1280/1440/1920. Bump theme version to
2.15.5.
@jasperf
jasperf merged commit 197ca5d into main Jul 23, 2026
3 checks passed
@jasperf
jasperf deleted the v2.15.5 branch July 23, 2026 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant