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

Auto detect scrolling container #3840

Merged
merged 3 commits into from
Aug 1, 2023
Merged

Auto detect scrolling container #3840

merged 3 commits into from
Aug 1, 2023

Conversation

luin
Copy link
Member

@luin luin commented Jul 25, 2023

Closes #2166, #3199, #1527, #2091, #2642

Changes:

  • Auto detect scrolling container
  • Quill#focus() accepts preventScroll option. A usage of this is in restoreFocus() in base.ts.
  • Added Quill#scrollRectIntoView(). This makes developers easy to override Quill#scrollSelectionIntoView().

Improvements

  1. Supported scrolling multiple ancestor scrolling container
  2. Supported VisualViewport API so it works with works with mobile soft keyboard ([iOS 12] Quill editor does not scroll while typing. Cursor hidden under soft keyboard #2642).
  3. Supported scrolling in both block and inline direction.
  4. Supported scroll-padding CSS property to allow users customize the scrolling behavior.
  5. Supported transform: scale(x).
  6. Took borders, scrollbar sizes into consideration.

@luin luin force-pushed the zh-selection-scroll branch 9 times, most recently from ea2d802 to 42f49b8 Compare August 1, 2023 03:24
@luin luin marked this pull request as ready for review August 1, 2023 04:30
@luin luin requested a review from jhchen August 1, 2023 04:30
In RFC the sizes can be negative when the origin is at the right/bottom side,
to address this, we use abc() to get the expected value.
@jhchen jhchen merged commit 601e287 into develop Aug 1, 2023
5 checks passed
@jhchen jhchen deleted the zh-selection-scroll branch August 1, 2023 14:45
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.

Scroll position jumps when editor is inside of wrapper div
2 participants