Skip to content

Nav dropdown closes when a smaller/shorter 3rd level dropdown is expanded #5435

@aslaymoore

Description

@aslaymoore

Problem/Motivation

The navigation dropdown menu closes when you open a 3rd level menu that is shorter than the previous state/height of the dropdown menu. This makes it harder to browse menu items to find the page you're looking for, and forces you to open the dropdown multiple times.

Describe the bug

When a 3rd level menu is expanded that is shorter than the previously opened 3rd level menu, the overall height of the dropdown menu shrinks. The change in height leads to your mouse being outside of the dropdown menu (outside of hover/focus target), which subsequently causes the dropdown menu to close.

Example:

Nav item A
   - Dropdown item A1
   - Dropdown item A2
      - Sub-item a
      - Sub-item b
      - Sub-item c
      - Sub-item d
      - Sub-item e
      - Sub-item f
   - Dropdown item A3
Nav item B
Nav item C
   - Dropdown item C1
   - Dropdown item C2
   - Dropdown item C3
      - Sub-item a
      - Sub-item b
      - Sub-item c
Nav item D

Dropdown item A2 has 6 dropdown items, whereas Dropdown item C3 only has 3 items. If I expand Dropdown item A2 and then try to expand Dropdown item C3, the entire dropdown menu closes before I have a chance to do anything, because the height of the dropdown menu with Dropdown item C3 expanded is less than that of the dropdown menu with Dropdown item A2 expanded.

To Reproduce

  1. Visit https://marcom.arizona.edu/brand-guidelines
  2. Expand the "Brand Guidelines" menu item
  3. Expand the "Logos" dropdown item
  4. With the menu still open, move your mouse to the "Rights & Releases" dropdown item and expand it.
  5. Observe the dropdown menu close.

Proposed resolution

Prevent premature closing of the dropdown menu when 3rd level menu items are expanded and collapsed.

Expected behavior

Dropdown menu should remain active/open when dropdown menu hight changes due to expansion/collapse of 3rd level menu items.

Screen recording

Screen.Recording.2026-03-23.at.2.59.04.PM.mov

Metadata

Metadata

Labels

bugSomething isn't workingusabilityImprovements to usability of Quickstart componentsuser experienceImprovements to user experience

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions