Skip to content

Commit

Permalink
Fixed focus logic to not unfocus the parent when a child receives focus.
Browse files Browse the repository at this point in the history
  • Loading branch information
michielvandergeest committed Feb 16, 2024
1 parent 1cdb0f2 commit 0fb3a91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/focus.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default {
},
set(component, event) {
clearTimeout(setFocusTimeout)
focusedComponent && focusedComponent.unfocus()
focusedComponent && focusedComponent !== component.parent && focusedComponent.unfocus()
focusChain.reverse().forEach((cmp) => cmp.unfocus())
if (component !== focusedComponent) {
setFocusTimeout = setTimeout(
Expand Down

0 comments on commit 0fb3a91

Please sign in to comment.