Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] Fixed Using safe area causes white area at the top upon entry focus #26063

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Core/src/Platform/iOS/KeyboardAutoManagerScroll.cs
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,12 @@ internal static void AdjustPosition()
else if (cursorRect.Y <= topBoundary && cursorRect.Bottom <= bottomBoundary)
{
move = cursorRect.Y - (nfloat)topBoundary;

// no need to move the screen down if we can already see the view
if (move < 0)
{
move = 0;
}
Comment on lines +469 to +474
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we'd want to always ignore this move down when we are in the safeArea space. Also consider when we are in a scrollview and we want the standard safe area and the next entry is in the top safe area space. In this example, we would expect that the scrollview scrolls down. Perhaps we can see if the IgnoreSafeArea is set, then we can change that top boundary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll revisit the implementation and analyze an alternate fix to restrict unnecessary scrolling when the keyboard opens. I'll ensure the behavior accommodates scenarios like ScrollView scrolling into the safe area correctly when required.

}

else if (cursorRect.Y <= topBoundary && cursorRect.Bottom >= bottomBoundary)
Expand Down
Loading