Skip to content
Merged
Show file tree
Hide file tree
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions src/Controls/tests/TestCases.HostApp/Issues/Issue27750.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
namespace Maui.Controls.Sample.Issues;

[Issue(IssueTracker.Github, 27750, "[iOS] Editor scrolled to the bottom when tapped while inside the ScrollView", PlatformAffected.iOS)]
public partial class Issue27750 : ContentPage
{
public Issue27750()
{

var scrollView = new ScrollView();
var grid = new Grid
{
RowDefinitions = new RowDefinitionCollection
{
new RowDefinition { Height = GridLength.Auto },
new RowDefinition { Height = GridLength.Auto }
},
RowSpacing = 4
};
var boxView = new BoxView
{
HeightRequest = 50,
BackgroundColor = Colors.Aqua,
};
var editor = new UITestEditor
{
Placeholder = "Editor with 25 Height Request",
AutomationId = "Editor",
HeightRequest = 25,
IsCursorVisible = false,
TextColor = Colors.Black,
BackgroundColor = Colors.SpringGreen,
};
grid.Children.Add(boxView);
grid.Children.Add(editor);
grid.SetRow(editor, 1);

scrollView.Content = grid;
Content = scrollView;
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

namespace Microsoft.Maui.TestCases.Tests.Issues
{
public class Issue27750 : _IssuesUITest
{
public override string Issue => "[iOS] Editor scrolled to the bottom when tapped while inside the ScrollView";

public Issue27750(TestDevice device)
: base(device)
{ }

[Test]
[Category(UITestCategories.Editor)]
public void EditorShouldNotMoveToBottom()
{
App.WaitForElement("Editor");
App.Tap("Editor");

VerifyScreenshot();
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/Core/src/Platform/iOS/KeyboardAutoManagerScroll.cs
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ internal static void AdjustPosition()

// scenario where we go into an editor with the "Next" keyboard button,
// but the cursor location on the editor is scrolled below the visible section
if (View is UITextView && IsKeyboardShowing && cursorRect.Bottom >= viewRectInWindow.GetMaxY())
if (View is UITextView && IsKeyboardShowing && cursorRect.Y >= viewRectInWindow.GetMaxY())
{
move = viewRectInWindow.Bottom - (nfloat)bottomBoundary;
}
Expand Down
Loading