iOS Editor cursor above keyboard location can be inconsistent #24635
Labels
area-controls-editor
Editor
area-keyboard
Keyboard, soft keyboard
platform/iOS 🍎
t/bug
Something isn't working
Milestone
Description
After this PR lands, iOS Editors can now keep the cursor above the keyboard when new lines are added. However, there is a small bug where the cursor location can be a little higher than most scenarios, and I am not sure why.
I've found this to happen when the bottom line is empty and we click and scroll the line above that last empty line. If the bottom line is not empty, this does not occur. I haven't noticed this occurring in other scenarios. In the video I attach here, it does happen in the middle in a seemingly different scenario, but I did not close and open the keyboard before so that would be worth looking into more. I have checked the ContentInset, TextContainerInset, ContentOffsets, and CursorRects in these scenarios and they all seem to be consistent whether the bottom line has text or not.
Screen.Recording.2024-09-06.at.2.17.53.PM.mov
Steps to Reproduce
Place a long Editor on a MAUI app on an iPhone. By adding new lines, you should see the cursor stay above the keyboard. However, if you add two blank new lines at the very end of this editor, click the second to last line, and keep adding new lines, you should see the cursor stays even higher above the keyboard than with other lines.
Link to public reproduction project repository
No response
Version with bug
Unknown/Other
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 17.2
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: