Skip to content

Commit bdf7bae

Browse files
committed
fix(material/menu): do not auto-focus when hover opens menu
1 parent 517c712 commit bdf7bae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/material/menu/menu.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2510,7 +2510,7 @@ describe('MatMenu', () => {
25102510
}),
25112511
);
25122512

2513-
it('should not re-focus a child menu trigger when hovering another trigger', fakeAsync(() => {
2513+
it('should preserve focus on a child menu trigger when hovering another trigger', fakeAsync(() => {
25142514
dispatchFakeEvent(instance.rootTriggerEl.nativeElement, 'mousedown');
25152515
instance.rootTriggerEl.nativeElement.click();
25162516
fixture.detectChanges();
@@ -2529,7 +2529,7 @@ describe('MatMenu', () => {
25292529
fixture.detectChanges();
25302530
tick(500);
25312531

2532-
expect(document.activeElement).not.toBe(
2532+
expect(document.activeElement).toBe(
25332533
levelOneTrigger,
25342534
'Expected focus not to be returned to the initial trigger.',
25352535
);

0 commit comments

Comments
 (0)