Skip to content

Conversation

@crisbeto
Copy link
Member

Includes a couple of changes:

refactor(cdk/overlay): add way to only handle specific events in overlay

We dispatch keyboard events to the different overlays depending on their attachment order and if they're listening for keyboard events. This works fine for the most part, but can lead to unexpected behavior where an overlay only cares about one type of event which ends up blocking the event from reaching other overlays.

These changes add an eventPredicate option that overlay can use to allow some events to pass through.

fix(material/tooltip): do not block events to other overlays

Fixes that the tooltip was blocking keyboard events to other overlays, even if it doesn't care about them.

Fixes #32760.

@crisbeto crisbeto added target: patch This PR is targeted for the next patch release merge: preserve commits When the PR is merged, a rebase and merge should be performed labels Feb 10, 2026
@pullapprove pullapprove bot requested review from ok7sai and wagnermaciel February 10, 2026 08:05
We dispatch keyboard events to the different overlays depending on their attachment order and if they're listening for keyboard events. This works fine for the most part, but can lead to unexpected behavior where an overlay only cares about one type of event which ends up blocking the event from reaching other overlays.

These changes add an `eventPredicate` option that overlay can use to allow some events to pass through.
Fixes that the tooltip was blocking keyboard events to other overlays, even if it doesn't care about them.

Fixes angular#32760.
@crisbeto crisbeto force-pushed the 32760/tooltip-events branch from 2f55883 to 003a4c2 Compare February 10, 2026 13:14
@adolgachev adolgachev self-requested a review February 10, 2026 17:29
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Feb 10, 2026
@crisbeto crisbeto merged commit 06750e0 into angular:main Feb 10, 2026
24 of 27 checks passed
@crisbeto
Copy link
Member Author

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: cdk/overlay area: material/tooltip merge: preserve commits When the PR is merged, a rebase and merge should be performed target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(MatMenu): MatTooltip receives focus using arrow key navigation on the keyboard

2 participants