January 24, 2023, 3:34pm
I have a problem since last update - when I switch between windows, when I start scrolling in the new window, it jumps seemingly to random place, it does not do this always and so far I fail to see the pattern on when it does happen.
I am a developer, so I am switching between browser and VS code and when I scroll in either one, before it starts acting as expected, it scrolls to end of page/ start of page - seems really random.
If anybody can help I’d be glad.
January 24, 2023, 3:50pm
Found a solution to this, still not completely sure why and there have been more solutions in the thread, but this worked for me:
Just posting here in case anybody would have the same problem. Basically windows would listen to scroll events while other windows would be active, therefore after switching back to a window and scrolling, first the scroll from the other window would apply and then the scroll that is meant to happen. Hope that makes sense.
Thread about the problem:
08:53AM - 15 Jun 17 UTC
- VSCode Version: starting at 1.13.0, up to current
- OS Version: Fedora 24-27
Looks like VS Code is listening to mouse scroll events, even while it is not active in the window.
**Steps to Reproduce**
requirements: Browser (Chromium / Firefox / Google Chrome), VSCode Editor (Any file type. Ideally a long file to ensure the scroll is visible.)
VSCode: Leave cursor at top of file.
Browser: Scroll, excessively, (For a few seconds) down the page. Even if it's a blank tab with no content.
VSCode: Scroll, ever so slightly, in any direction.
You'll find the editor will jump suddenly further down the active file.
It seems VSCode is receiving the scroll events, for whatever reason; which are all suddenly evaluated upon any form of scroll input in the editor.
**Updates based on comments**
GUESS: Appears to be an issue with Electron and some input libraries?
Is not isolated to VScode
Fix: Does not yet exist.
Linux Workarounds (Not to be confused with a fix)
imwheel - not suitable for all users
wayland - not suitable for all users
Note: Ubuntu 19.04 (Desktop) appears to be using Wayland.
I'm not sure we will see further updates in here, which is a bit disappointing from the developers, given the amount of comments from affected people. I would like to have some official guidance, even if it's pointing us to other resources.
I had noticed that behavior in gnome-console and gnome-terminal, but had not worried about the cause since it seemed minor to me.
This thread and the workaround seemed simple so I tried that fix. Thankfully it worked and at least so far I no longer am getting the extreme jumps when scrolling in the terminal window.
Thanks for posting the fix for us.