Hello there folks,
I was concerned about reporting this through Github issues as I have a feeling this is not a bug on Codemirror, but perhaps some required adaptation due to changes (or bug) on Google Chrome’s latest release.
My shader editor ( https://thecodetherapy.com ), as much as some very popular projects like ShaderToy ( https://www.shadertoy.com/ ) uses Codemirror, and I noticed that after the latest Google Chrome update, the inner contents of the editor only scroll a small amount and then scrolling stops. However, I noticed that if you keep the mouse cursor moving all the time, the scroll never gets interrupted and works as intended.
The issue is more easily noticeable when accessing some long content ( as in: The 80s On ASCIID @ TheCodeTherapy on PRGM1 tab). On Firefox everything keeps working as expected.
I’m presuming this is somehow related to some changes in Google Chrome in regards to the way event listeners work (maybe a Google Chrome bug or an intended change) and unfortunately, I couldn’t find anything in their release notes to help me understand where to start investigating this issue.
If anyone could point me to a most probable cause for this so I can dig further trying to “fix” this, it would be highly appreciated.
*EDIT 1: This issue is also noticeable on Codemirror examples, like this one: CodeMirror: Sublime Text bindings demo Steps to reproduce are: 1) copy some lines inside the bindings object and paste them over and over again to make the content big enough for the issue to be noticeable; 2) try to scroll through the content without moving the mouse pointer (scroll will stop working); 3) when the scroll stops working, try doing the same while constantly moving the mouse pointer (scroll will keep working as expected);
*EDIT 2: I could find no warnings or errors on the browser’s console.
My Chrome version: Version 102.0.5005.61 (Official Build) (64-bit) on Linux
Kindest regards,
Marco.