mui / mui/base-ui

[tooltip] Escape stack broken for unfocused Tooltip inside Dialog

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

Description

# Bug report

## Current behavior

![Image](https://github.com/user-attachments/assets/989d72f1-66f4-40b8-b588-187f01629830)

When there is a tooltip inside a dialog, if the tooltip is opened without focus on the tooltip trigger and ESC is pressed, the tooltip's handleOpenChange does not fire. Instead, the dialog's handleOpenChange fires immediately, making escape stack control impossible.

## Reproducible example

[https://codesandbox.io/p/sandbox/4s92t5](https://codesandbox.io/p/sandbox/4s92t5)

## Base UI version

v1.1.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.