Skip to content

Commit

Permalink
fix: Avoid checking for focus on non-live elements
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Jul 24, 2024
1 parent 1a6820b commit 53caef3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Uno.UI/UI/Xaml/Input/Internal/FocusProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ internal static bool ShouldSkipFocusSubTree(DependencyObject parent) =>

internal static bool HasFocusedElement(DependencyObject element)
{
//if (element->IsActive())
if (element is UIElement { IsInLiveTree: true })
{
var focusManager = VisualTree.GetFocusManagerForElement(element);

Expand Down

0 comments on commit 53caef3

Please sign in to comment.