Browse Source

Fix comment

pull/11407/head
Max Katz 3 years ago
parent
commit
44e3a532b6
  1. 2
      src/Avalonia.Base/Input/FocusManager.cs

2
src/Avalonia.Base/Input/FocusManager.cs

@ -197,7 +197,7 @@ namespace Avalonia.Input
// Element might not be a visual, and not attached to the root.
// But IFocusManager is always expected to be a FocusManager.
return (FocusManager?)((IInputRoot?)(element as Visual)?.VisualRoot)?.FocusManager
// In our unit tests some elements might not have a root. Remove when
// In our unit tests some elements might not have a root. Remove when we migrate to headless tests.
?? (FocusManager?)AvaloniaLocator.Current.GetService<IFocusManager>();
}

Loading…
Cancel
Save