Problem/Motivation

When the navigation toolbar is collapsed, your on a hover supported device and you hover over the "?" icon in the footer area, the 'Help' tooltip that pops up is slightly obstructed.

Screenshot of obstructed Help tooltip

Steps to reproduce

On a deskto device supporting hover, collapse the toolbar and hover over the Help icon in the footer. Note the tooltip that appears is slightly obstructed by the right border of the navigation toolbar.

Issue fork drupal-3443835

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

m4olivei created an issue. See original summary.

ckrina’s picture

Project: Navigation » Drupal core
Version: 1.x-dev » 11.x-dev
Component: Code » navigation.module
m4olivei’s picture

I fired up an MR thinking this would be easy. I spent a good half hour just finding where that border is defined that is obstructing the tooltip. It's here, for future me or others that come to this issue 😅

https://git.drupalcode.org/project/drupal/blob/11.x/core/modules/navigat...

ckrina’s picture

Issue tags: +Novice, +Portland2024
aronm’s picture

I am with @dalin at DrupalCon Portland 2024, and I am going to look at fixing this issue within the next hour.

dalin’s picture

I'm mentoring @aronm on how to contribute to their first d.o issue.

aronm’s picture

Status: Active » Needs review
StatusFileSize
new83.19 KB

Problem:

The tooltip itself has a z-index of 801. The border comes from .admin-toolbar::after which is part of admin-toolbar and has a z-index of 501. However, #menu-footer, which is an ancestor of the tooltip has a z-index of -1, which is overriding the 801 z-index of the tooltip.

Changing the z-index of #menu-footer to a higher value caused the element to overlap .admin-toolbar and make the border disappear.

Tried applying a border-inline-end to the #menu-footer, which caused a flicker when the menu expanded.

The arrangement of all the associated elements needs to be refactored to fix this correctly. However, a simpler fix is to change the hardcoded offset position of the tooltip in tooltip.js. Shifted the offset from 6px to 18 px.

Thanks @javi-er and @dalin for assistance with this issue.

finnsky’s picture

Issue tags: -Novice

Thank you for you work here!

In my point of view we still need to fix z-index and we cannot move tooltip.

I see 2 ways:
1. Manage border on menu level.
2. Backport popover api approach from https://www.drupal.org/project/drupal/issues/3197758 it will be on top layer
https://developer.chrome.com/blog/introducing-popover-api

In any case i don't think it is novice issue anymore.

finnsky’s picture

Status: Needs review » Needs work

Gauravvvv made their first commit to this issue’s fork.

gauravvvv’s picture

Status: Needs work » Needs review
finnsky’s picture

Status: Needs review » Reviewed & tested by the community

Looks good. Issue fixed. No regressions. Thank you!

ckrina changed the visibility of the branch 11.x to hidden.

  • ckrina committed 4839441f on 11.x
    Issue #3443835 by Gauravvvv, aronm, m4olivei, finnsky, dalin, javi-er: '...

  • ckrina committed 43c771b3 on 11.0.x
    Issue #3443835 by Gauravvvv, aronm, m4olivei, finnsky, dalin, javi-er: '...

  • ckrina committed 1142c1c4 on 10.4.x
    Issue #3443835 by Gauravvvv, aronm, m4olivei, finnsky, dalin, javi-er: '...

  • ckrina committed 981989f1 on 10.3.x
    Issue #3443835 by Gauravvvv, aronm, m4olivei, finnsky, dalin, javi-er: '...

ckrina credited javi-er.

ckrina’s picture

Status: Reviewed & tested by the community » Fixed

Committed 981989f and pushed to 10.3.x. Thanks!

javi-er’s picture

StatusFileSize
new6.25 MB

We considered the implemented approach but the problem with this is that when the menu slides to the right it covers the borders for a short amount of time causing some flickering, that's why the original approach used an :after pseudoelement imo.
It's a tiny issue and not very noticeable, so I'll leave to the maintainer to decide if further action is needed, see attached video.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.