monaco-editor version: 0.20.0
Browser: Firefox 73
OS: Debian
Tested on several computers (always Linux).
On a Monaco-Editor (eg https://microsoft.github.io/monaco-editor/ ), when I scroll down with the mouse, it scrolls down by 4 lines at a time on Chrome but it's 8 lines at a time on Firefox (which is obviously too fast).
@alexdima it's not a Feature request, it's a bug report.
I confirm that the pull request https://github.com/microsoft/vscode/pull/95967 fixes my issue. Thanks a lot CGNonofr!
There is another aspect to this issue:
Because mouse wheel scrolling is so slow in Firefox by default, a common practice is to increase mousewheel.default.delta_multiplier_y from 100 to something higher (I'm using 500) in the profile settings. Apparently this gets incorporated into the equation currently, which results in crazy mouse scrolling speeds: For me, a single mouse tick scrolls several screen pages.
If the Monaco editor chooses to go for a high default anyway it should ignore any "scrolling speed up settings" to avoid crazy results. Alternatively the default would have to be as slow as default scrolling to lead to similar scrolling speeds.
Some numbers: At delta_multiplier_y 100, scrolling on a normal page is 2 cm on screen. Accordingly, changing it to 500 makes it 10 cm, which works good for whole page contents.
In the Monaco editor the default scroll tick is already ~ 5 cm on screen. Incorporating the multiplier makes it 25 cm, which is simply not usable. Even for whole page scrolling that would be a lot, but the problem gets worse if the editor is embedded into a div of reduced height. Often a single mouse wheel tick can turn into "three pages down".
@CGNonofr Does microsoft/vscode#95967 already account for that?
With or without my changes, delta_multiplier_y is taken into account. All my PR is doing is making the scroll slower on firefox (by 16/50) which makes, by default, the scroll as fast in Firefox and Chrome. (While removing magic numbers from the code: the 16px comes from firefox defaults, and the 50 is the value by which the result is multiplied in another file, but unfortunately not exported => https://github.com/microsoft/vscode/blob/a7c698ce0c64b6ee83d43fbd7d986df461a1306f/src/vs/base/browser/ui/scrollbar/scrollableElement.ts#L22)
I cannot reproduce this on a mac. I'm trying https://microsoft.github.io/monaco-editor/ with an external mouse with a physical mouse wheel and I'm doing one scroll "flick"


Most helpful comment
I confirm that the pull request https://github.com/microsoft/vscode/pull/95967 fixes my issue. Thanks a lot CGNonofr!