mui / mui/base-ui

[navigation menu] Hover events that happen before hydration don't get replayed by React

Open
#3,570 3 comments 2 reactions 0 assignees View on GitHub
component: navigation menu has workaround type: bug
Dominant language
TypeScript
Stars
10.9k
Forks
543
Avg merge
1d 20h
Merged PRs (30d)
101

Description

# Bug report

## Current behavior

Render a NavigationMenu.Root with one or more NavigationMenu.Trigger + NavigationMenu.Content items on the server (SSR).
Load the page and immediately move the mouse over a dropdown trigger (before hydration completes).
Observe that the dropdown does not open on that first hover.
Hover away and hover the trigger again (after hydration) — now it opens normally.

The initial hover interaction is effectively “lost” during hydration, so users must hover again to open the menu.

## Expected behavior

If the pointer is already hovering a trigger when hydration completes (or if the first hover happens immediately after load), the corresponding menu should open without requiring a second hover.

## Reproducible example

https://base-ui.com/react/components/navigation-menu

## Base UI version

1.0.0

## Which browser are you using?

Chrome

## Which OS are you using?

Mac OS

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.