Skip to content

Commit

Permalink
Fixing focus restoration for added children (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-wozniak authored Oct 9, 2023
1 parent dc0e10f commit 26a67b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SpatialNavigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 26a67b8

Please sign in to comment.