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

Mobile: Fixes #9322: Fix editor scrollbar on iOS #9531

Merged

Conversation

personalizedrefrigerator
Copy link
Collaborator

@personalizedrefrigerator personalizedrefrigerator commented Dec 16, 2023

Summary

Uses the root element as the scrolling element, rather than CodeMirror's internal scroller on mobile.

It seems that the scrollbar-related bug does not occur when the root document element is used to scroll.

Fixes #9322.

Testing

  1. Open a very long note
  2. Scroll down using the scrollbar
  3. Scroll back to the top by clicking on the top of the screen
  4. Create a new note
  5. Click on the bottom of the body area to edit it

This has been tested on an iOS 17.0 simulator and a physical iOS 17.2 device.

  • This still needs to be tested on Android.

@personalizedrefrigerator personalizedrefrigerator changed the title Mobile: Fixes #9322: Fix scrollbar on iOS Mobile: Fixes #9322: Fix editor scrollbar on iOS Dec 16, 2023
@@ -150,6 +153,7 @@ const ExtendedWebView = (props: Props, ref: Ref<WebViewControl>) => {
onMessage={props.onMessage}
onError={props.onError}
onLoadEnd={props.onLoadEnd}
decelerationRate='normal'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This fixes the "scroll feels non-native" issue we were previously experiencing when using the WebView top-level scroll.

This should also allow removing some iOS-specific viewer CSS that was added to work around this issue.

@laurent22 laurent22 merged commit b237a92 into laurent22:dev Dec 17, 2023
10 checks passed
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.

iOS: Note editor scrollbar doesn't work in notes with many wrapped lines
2 participants