feat: scroll to input's caret and when user types#723
Merged
Conversation
|
@bigcupcoffee is attempting to deploy a commit to the lodev09 Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
Author
|
@lodev09 since it's not that much code does it have a chance to merge? |
|
Hey @bigcupcoffee, this PR is missing a changelog entry. Add the following under the Unreleased section in See CONTRIBUTING.md for more details. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…board is shown Co-Authored-By: Jovanni Lo <lodev09@gmail.com>
Owner
|
🚀 This pull request is included in v3.11.4. See Release 3.11.4 for release notes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Quick disclaimer: when I was recording the clips, I encountered a crash when grabbing the caret, upon rebuilding with Xcode to monitor it, it vanished, I'm still somewhat concerned of this, worth testing
This is not a lot of code for a decent UX requirement. Whenever user types it scrolls to the caret
Resolves two issues:
This does not handle cases of a caret movement via other means (other than typing), because handling that would require:
onSelectionChanged) OR hijacking its AccessibilityDelegate (TYPE_VIEW_TEXT_SELECTION_CHANGED)This is showcased on the videos - moving caret upwards (on iOS) doesn't scroll to it, user has to type first. On Android upwards is handled by the platform, but moving it down also doesn't scroll to it, making the user type
Since you can achieve an okayish UX with a clean and minimal diff, I figured I'll PR this anyway even though #705 was closed
Type of Change
Test Plan
Simulators
Screenshots / Videos
Checklist