Skip to content

Commit fcc46a7

Browse files
Merge pull request #18390 from unoplatform/dev/mazi/keyboard-focus-layout-loop
2 parents 4665242 + 9b1d5d1 commit fcc46a7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Uno.UI.RuntimeTests/Tests/Uno_UI_Xaml_Controls/Given_SystemFocusVisual.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,5 +177,15 @@ public async Task When_Focused_Element_Transformed()
177177
Assert.AreEqual(focusPoint.X, buttonPoint.X);
178178
Assert.AreEqual(focusPoint.Y, buttonPoint.Y);
179179
}
180+
181+
[TestMethod]
182+
[RequiresFullWindow]
183+
public async Task When_Keyboard_Focus()
184+
{
185+
// This sequence on full window test previously caused infinite layout loop
186+
var button = new Button() { Content = "Test" };
187+
await UITestHelper.Load(button);
188+
button.Focus(FocusState.Keyboard);
189+
}
180190
}
181191
#endif

0 commit comments

Comments
 (0)