Skip to content

Commit

Permalink
fix(textbox): textbox vertical scrolling not following the caret
Browse files Browse the repository at this point in the history
  • Loading branch information
ramezgerges committed May 20, 2024
1 parent 057b269 commit ddca51c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Uno.UI/UI/Xaml/Controls/TextBox/TextBox.skia.cs
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ private void UpdateScrolling()

// TODO: we are sometimes horizontally overscrolling, but it's more visually pleasant that underscrolling as we want the caret to be fully showing.
var newHorizontalOffset = horizontalOffset.AtMost(rect.Left).AtLeast(Math.Ceiling(rect.Left - sv.ViewportWidth + InlineCollection.CaretThickness));
var newVerticalOffset = verticalOffset.AtMost(rect.Top).AtLeast(rect.Top - sv.ViewportWidth);
var newVerticalOffset = verticalOffset.AtMost(rect.Top).AtLeast(rect.Top - sv.ViewportHeight);

sv.ChangeView(newHorizontalOffset, newVerticalOffset, null);
}
Expand Down

0 comments on commit ddca51c

Please sign in to comment.