Skip to content

Commit 69921d7

Browse files
committed
Fix RTL ScrollView issued and add delay for dismissing keyboard
1 parent 72d54fa commit 69921d7

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/EditorFeatureTests.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,22 @@ public void VerifyEditorTextChangedEvent()
6767
#endif
6868

6969
[Test, Order(1)]
70-
public void VerifyEditorFocusedEvent()
70+
public async Task VerifyEditorFocusedEvent()
7171
{
7272
App.WaitForElement("TestEditor");
7373
App.Tap("TestEditor");
74+
await Task.Delay(100);
7475
App.DismissKeyboard();
7576
Assert.That(App.WaitForElement("FocusedLabel").GetText(), Is.EqualTo("Focused: Event Triggered"));
7677
}
7778

7879
[Test, Order(3)]
79-
public void VerifyEditorUnfocusedEvent()
80+
public async Task VerifyEditorUnfocusedEvent()
8081
{
8182
App.WaitForElement("TestEditor");
8283
App.WaitForElement("SelectionLengthEntry");
8384
App.Tap("SelectionLengthEntry");
85+
await Task.Delay(100);
8486
App.DismissKeyboard();
8587
Assert.That(App.WaitForElement("UnfocusedLabel").GetText(), Is.EqualTo("Unfocused: Event Triggered"));
8688
}

src/Core/src/Handlers/ViewHandlerExtensions.iOS.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ internal static void PlatformArrangeHandler(this IViewHandler viewHandler, Rect
131131
var centerX = rect.Center.X;
132132

133133
var parent = platformView.Superview;
134-
if (parent?.EffectiveUserInterfaceLayoutDirection == UIUserInterfaceLayoutDirection.RightToLeft)
134+
if (parent?.EffectiveUserInterfaceLayoutDirection == UIUserInterfaceLayoutDirection.RightToLeft &&
135+
parent is not MauiScrollView)
135136
{
136137
// We'll need to adjust the center point to reflect the RTL layout
137138
// Find the center of the parent

0 commit comments

Comments
 (0)