Ionaru / easy-markdown-editor

EasyMDE: A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.
https://stackblitz.com/edit/easymde
MIT License
2.31k stars 308 forks source link

Side-by-Side Mode Scroll Issue with Long Texts #554

Open shinohara-f opened 11 months ago

shinohara-f commented 11 months ago

Describe the bug When using EasyMDE in side-by-side mode with a large body of text (over 1000 lines), the scroll position does not match between the two panes initially. However, once scrolled all the way to the bottom, the scrolling synchronization starts to function correctly.

To Reproduce

Expected behavior The scrolling position should be synchronized between the two panes in side-by-side mode, regardless of the length of the text or the initial scroll position.

Screenshots

screenshot 2023-08-04 6 39 35

Version information

OS: macOS 13.3.1 (a) Browser: Chrome 115.0.5790.114 EasyMDE version: 2.18.0

Additional context This issue makes navigating through large documents inconvenient and disorienting, and I'm hoping it can be addressed. This mismatch in scroll position is only corrected after scrolling all the way to the bottom.

Ionaru commented 11 months ago

Thank you for the report! I'll have a look at it.

shinohara-f commented 9 months ago

@Ionaru

Hello! I was wondering if there has been any progress on this bug. If you're already working on a fix, that's great—I'll leave it to you.

However, if you haven't had the time to look into it yet, I'd be willing to help out if I can. I should note that I have absolutely no knowledge of this library's code, so any pointers or ideas you could provide would be extremely helpful.

Thank you.

Ionaru commented 9 months ago

Hello!

I haven't had the chance to look at this issue in-depth yet, my apologies.

As far as I'm aware, the editor code relies on CodeMirror to handle scrolling, but I could be mistaken.