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

[SuperEditor] Fix content jumping when typing close to the editor's edge (Resolves #720) #733

Merged
merged 3 commits into from
Aug 13, 2022

Conversation

angelosilvestre
Copy link
Collaborator

[SuperEditor] Fix content jumping when typing close to the editor's edge. Resolves #720

Typing at the first two lines of the editor was causing the content to jump, as seen in this video:

Screen.Recording.2022-07-30.at.22.02.09.mov

This is caused by the DragHandleAutoScroller, which updates the scrollPosition every time we are closer to the edge than what's defined by its _dragAutoScrollBoundary. The issue is more evident if we use a custom stylesheet with less padding because we will be closer to the edge.

The issue is also happening when typing at the last line of the document.

This PR changes the behavior to avoid updating the scrollPosition if we are already at the edge of the editor.

Copy link
Contributor

@matthew-carroll matthew-carroll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@matthew-carroll matthew-carroll merged commit c248522 into superlistapp:main Aug 13, 2022
@angelosilvestre angelosilvestre deleted the issue-720 branch August 16, 2022 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

First two lines jumps when writing in gestureMode: DocumentGestureMode.iOS or DocumentGestureMode.android
2 participants