mui / mui/base-ui

[popover] `openOnHover` issue

Open
#3,341 4 comments 0 reactions 0 assignees View on GitHub
component: popover type: enhancement
Dominant language
TypeScript
Stars
10.9k
Forks
543
Avg merge
1d 20h
Merged PRs (30d)
101

Description

# Bug report

## Current behavior

I use Popover with openOnHover and want to prevent any action when it opens via trigger-press. Inside onOpenChange I call eventDetails.cancel() for trigger-press. Despite that, the popover still opens after the hover delay — even though the pointer already left the trigger.

## Expected behavior

Cancelling trigger-press should keep the popover closed entirely. The delayed hover timer that started during the click should be cleared when the pointer leaves the trigger; otherwise the popover opens “late” although the cursor is no longer over the trigger.

## Reproducible example

```
{
if (open) {
if (eventDetails.reason === 'trigger-press') {
eventDetails.cancel();
}
}
}}
>
```

Steps:
1. Press the trigger.
2. Move the cursor away.
3. After delay the popover opens, even though trigger-press was cancelled and the cursor isn’t over the trigger anymore.

## Base UI version

1.0.0-beta.6

## Which browser are you using?

Chrome

## Which OS are you using?

Windows

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.