Skip to content
Closed
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
4 changes: 2 additions & 2 deletions src/Core/src/Handlers/ScrollView/ScrollViewHandler.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -314,12 +314,12 @@ static Size SetContentSizeForOrientation(UIScrollView platformScrollView, Scroll

internal static Size AccountForOrientation(Size size, double widthConstraint, double heightConstraint, ScrollOrientation orientation)
{
if (orientation is ScrollOrientation.Vertical or ScrollOrientation.Neither)
if (orientation is ScrollOrientation.Vertical or ScrollOrientation.Neither && widthConstraint > 0)
{
size.Width = widthConstraint;
}

if (orientation is ScrollOrientation.Horizontal or ScrollOrientation.Neither)
if (orientation is ScrollOrientation.Horizontal or ScrollOrientation.Neither && heightConstraint > 0)
{
size.Height = heightConstraint;
}
Expand Down