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 Keyboard Scrolling - Maui Community Toolkit Popup #19765

Closed

Conversation

tj-devel709
Copy link
Member

The MCT popup code was originally here, but moved to here so that the testing of the popup could be implemented without blocking the other parts of the PR.

MCT Popup

The iOS Keyboard Scrolling solution I posted a few months ago had an issue with the Maui Community Toolkit Popup. The main issue was that the popup has some external scrolling going on. The Maui code would grab the initial position of the cursor, the external scrolling would happen, and then our Maui code would scroll from the initial position making things messy and incorrect. The solution I came up with is refactoring the portion of the code that calculates where the cursor on the editor/entry is to later in the code and monitoring the ContainerView to see if there was a change in position and allotting time until this external scrolling is finished to start our scroll calculations. This should also help in future situations where we are not able to control an external scroll.

MCT Popup Example (click me!)

Before After
PopupScroll-Before.mov
PopupScroll-After.mov

Issues Fixed

Fixes PureWeen/ShanedlerSamples#13

@tj-devel709 tj-devel709 added platform/iOS 🍎 legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor area-controls-entry Entry area-keyboard Keyboard, soft keyboard labels Jan 8, 2024
@samhouts samhouts removed the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Jan 31, 2024
@tj-devel709
Copy link
Member Author

Closing for now until making more progress with MCT testing

@tj-devel709 tj-devel709 closed this Feb 1, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Keyboard] Auto-scroll does not work on CommunityToolkit.Maui.Core.Views.MauiPopup
2 participants