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

[ Fix : Inconsistent Page Scrolling Behavior When Typing in Quill Editor ] #162

Open
rohitPandey469 opened this issue Dec 18, 2024 · 0 comments

Comments

@rohitPandey469
Copy link

Describe the bug
When typing in the Quill editor component, the page scrolls to the top, and then without scrolling if again typed something then it scrolls back down to the bottom then again top . So, its like when the user kept on typing without scrolling or anything the screen goes UP and DOWN and finally stays at the top. Might it be because of updating the firebase doc each time the text gets updated in the editor so we can counter it by debounce or throttle the YJS document. And I have discussed about implementing something similar in issue #1131.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new tutorial.
  2. Start typing in the editor.
  3. Observe the page scrolling to the top.
  4. Well it's happening whenever you type something so to see it type until it scrolls to the bottom or lot's of text.

Expected behavior
Typing in the Quill editor should not cause the page to scroll unexpectedly. The editor should maintain the scroll position wherever we are typing and don't get scrolled on it's own.

Video

d85bcb3e-ed3c-405a-851c-aac47b48a469.mp4

When I type something it scrolls to the top and here I kept on typing without scrolling and it goes like to the top and then bottom and then stays at top.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome

Additional context
The issue could be related to doc update on each text update so we can use npm packages to debounce the yjs or manually do it.
Or some unintentional re-renders because of useEffect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant