Skip to content

Commit 764c150

Browse files
authored
Revert "fix(material/menu): not interrupting keyboard events to other overlays (#22856)" (#22924)
This reverts commit aeecb3c.
1 parent a4043f4 commit 764c150

File tree

3 files changed

+0
-9
lines changed

3 files changed

+0
-9
lines changed

src/material-experimental/mdc-menu/menu.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,14 +437,12 @@ describe('MDC-based MatMenu', () => {
437437
const panel = overlayContainerElement.querySelector('.mat-mdc-menu-panel')!;
438438
const event = createKeyboardEvent('keydown', ESCAPE);
439439

440-
spyOn(event, 'stopPropagation').and.callThrough();
441440
dispatchEvent(panel, event);
442441
fixture.detectChanges();
443442
tick(500);
444443

445444
expect(overlayContainerElement.textContent).toBe('');
446445
expect(event.defaultPrevented).toBe(true);
447-
expect(event.stopPropagation).toHaveBeenCalled();
448446
}));
449447

450448
it('should not close the menu when pressing ESCAPE with a modifier', fakeAsync(() => {

src/material/menu/menu.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,15 +436,13 @@ describe('MatMenu', () => {
436436

437437
const panel = overlayContainerElement.querySelector('.mat-menu-panel')!;
438438
const event = createKeyboardEvent('keydown', ESCAPE);
439-
spyOn(event, 'stopPropagation').and.callThrough();
440439

441440
dispatchEvent(panel, event);
442441
fixture.detectChanges();
443442
tick(500);
444443

445444
expect(overlayContainerElement.textContent).toBe('');
446445
expect(event.defaultPrevented).toBe(true);
447-
expect(event.stopPropagation).toHaveBeenCalled();
448446
}));
449447

450448
it('should not close the menu when pressing ESCAPE with a modifier', fakeAsync(() => {

src/material/menu/menu.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -337,12 +337,7 @@ export class _MatMenuBase implements AfterContentInit, MatMenuPanel<MatMenuItem>
337337
}
338338

339339
manager.onKeydown(event);
340-
return;
341340
}
342-
343-
// Don't allow the event to propagate if we've already handled it, or it may
344-
// end up reaching other overlays that were opened earlier (see #22694).
345-
event.stopPropagation();
346341
}
347342

348343
/**

0 commit comments

Comments
 (0)