From 26a67b8634e2bd631e7ad870c93d56f43ba9ed80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Wo=C5=BAniak?= Date: Mon, 9 Oct 2023 13:51:16 +0200 Subject: [PATCH] Fixing focus restoration for added children (#98) --- src/SpatialNavigation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SpatialNavigation.ts b/src/SpatialNavigation.ts index cd61dd1..dc7ec8c 100644 --- a/src/SpatialNavigation.ts +++ b/src/SpatialNavigation.ts @@ -1227,7 +1227,7 @@ class SpatialNavigationService { * If for some reason this component was already focused before it was added, call the update */ if (focusKey === this.focusKey) { - this.setFocus(focusKey); + this.setFocus(preferredChildFocusKey || focusKey); } /**