From cac3d3a7bce686e59b9f4ba7b3676a1e4f3a6704 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Mon, 12 Dec 2022 09:23:48 +0100 Subject: [PATCH] fix(cdk/stepper): set focus origin when navigating with keyboard Fixes that we weren't setting the focus origin in the stepper when navigating with the keyboard, causing it to be inferred as programmatic focus. Fixes #26210. --- src/cdk/stepper/stepper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cdk/stepper/stepper.ts b/src/cdk/stepper/stepper.ts index 96c132156fe8..8fec6f00156c 100644 --- a/src/cdk/stepper/stepper.ts +++ b/src/cdk/stepper/stepper.ts @@ -542,7 +542,7 @@ export class CdkStepper implements AfterContentInit, AfterViewInit, OnDestroy { this.selectedIndex = manager.activeItemIndex; event.preventDefault(); } else { - manager.onKeydown(event); + manager.setFocusOrigin('keyboard').onKeydown(event); } }