Scrolling is badly impacted by Chrome 94.0.4606.61

FYI, it looks like codemirror scrolling performance is awful in the recent version of Chrome 94.0.4606.61, even in the example input at - my data point (and those of my customers) is Windows 10, don’t know about Mac.

Nothing noticeable on Linux. Could you be a bit more specific about what you mean by scroll performance? How are you scrolling, and how big is the document?

Using a mouse wheel to scroll (keyboard page up/down nav is fine), and the doc isn’t large at all - anything that exceeds the input height. Before taking the Chrome update, a normal finger scroll on the wheel might scroll 50 lines in the Codemirror input, after the update the same gesture scrolls maybe 3 lines.

Also seen using Microsoft Edge (Chromium) v 94.0.992.31 - scrolling is worse there, with the same gesture scrolling fewer than 2 lines.

No issue w/ Firefox.

I currently see the issue on the codemirror site, in the Github online editor, and in ServiceNow’s script fields (all use Codemirror).

I suspect there’s nothing you can do except maybe file a Chromium bug. I can get a bunch of folks to star an issue, but I personally wouldn’t know the best way to most helpfully describe the issue for the Chromium dev team.

Finally had a chance to debug this. It seems Chrome 94 on Windows does some odd non-linear scrolling, where it slows down near the end and start of the document. That confused CodeMirror’s hacks to estimate how scroll units correspond to pixels. Fortunately, Chrome now supports a much better way to get the pixel offset of (most) wheel events, so this patch makes CodeMirror use that when available, which seems to resolve this issue.

I’ve published a patch release 5.63.1 which includes the fix.

Scrolling is badly impacted by Chrome 94.0.4606.61 - #3 by CapaJC

I’m using Chrome(v94.0.4606.61) on macOS(11.6) and had the same problem, and CodeMirror 5.63.1 continues to have the problem.

Oddly enough, the problem is only reproduced when I wheel with a USB-connected mouse, not with a Bluetooth-connected mouse nor with a MacBook trackpad.

Also, the problem does not occur in chrome v96 (canary).

I was able to confirm the problem with the following combinations.

If there is anything I can do to help, I will be happy to do so.

Translated with DeepL Translate: The world's most accurate translator (free version)

I found related issue on Chromium project page.

1253766 - chromium - An open-source project to help move the web forward. - Monorail

After updating to Chrome 94.0.4606.71, the problem seems to be resolved.

Glad to hear they released a fix!

I just upgraded to .71 and can confirm. That’s great :slight_smile: Thanks again.