File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -211,7 +211,12 @@ export class MatMenuTrigger extends MatMenuTriggerBase implements AfterContentIn
211
211
// Subscribe to changes in the hovered item in order to toggle the panel.
212
212
if ( this . triggersSubmenu ( ) && this . _parentMaterialMenu ) {
213
213
this . _hoverSubscription = this . _parentMaterialMenu . _hovered ( ) . subscribe ( active => {
214
- if ( active === this . _menuItemInstance && ! active . disabled ) {
214
+ if (
215
+ active === this . _menuItemInstance &&
216
+ ! active . disabled &&
217
+ // Ignore hover events if the parent menu is in the process of being closed (see #31956).
218
+ this . _parentMaterialMenu ?. _panelAnimationState !== 'void'
219
+ ) {
215
220
this . _openedBy = 'mouse' ;
216
221
// Open the menu, but do NOT auto-focus on first item when just hovering.
217
222
// When VoiceOver is enabled, this is particularly confusing as the focus will
You can’t perform that action at this time.
0 commit comments