Skip to content

Commit ea7078d

Browse files
[iOS] Fix extra bottom space in ScrollView when using SafeAreaEdges (#30976)
* Fix ScrollView bottom padding * Update KeyboardAutoManagerScroll.cs
1 parent 5041f71 commit ea7078d

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/Core/src/Platform/iOS/KeyboardAutoManagerScroll.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -307,17 +307,18 @@ internal static async Task AdjustPositionDebounce()
307307
{
308308
if (IsKeyboardShowing)
309309
{
310-
// If we are going to a new view that has an InputAccessoryView
311-
// while we have the keyboard up, we need a delay to recalculate
312-
// the height of the InputAccessoryView
313-
if (View?.InputAccessoryView is not null)
314-
{
315-
await Task.Delay(30);
316-
}
310+
// Universal 30ms delay for all input controls to ensure proper timing coordination
311+
// between keyboard auto-scroll and safe area adjustments.
312+
// This delay allows the InputAccessoryView setup completion for input controls.
313+
// Safe area system to process keyboard notifications first
314+
// Conflict resolution between auto-scroll and SafeAreaEdges.SoftInput settings
315+
// Without this delay, timing conflicts can cause double padding or incorrect positioning
316+
await Task.Delay(30);
317+
317318
AdjustPosition();
318319

319320
// See if the layout requests to scroll again after our initial scroll
320-
await Task.Delay(5);
321+
await Task.Delay(30);
321322
if (ShouldScrollAgain)
322323
{
323324
AdjustPosition();

0 commit comments

Comments
 (0)