How to solve a scrolling misbehavior after doing Alt+Tab?
Installing and running imwheel
fixes the problem for me.
$ sudo apt-get install imwheel
$ imwheel
INFO: imwheel started (pid=80085)
You have to start it at every boot (or add it at the applications to start).pgrep -lf imwheel
to see if it's running ; you can stop it with pkill imwheel
.
/!\ It disables the zoom by Ctrl + wheel
in applications (Firefox, Chromium, LibreOffice, PDF reader...)
(Maybe a setting in imwheelrc could fix that)
If you are asking for a solution, It's still an unsolved bug. But if you wonder why such a thing may happen, I think the reason is that scroll position is being unique for all windows, or it's being changed for all of them when you scroll. for example, if you scroll up in a window a little, then go to the other one and start scrolling, the bar jumps a little upper and starts moving from there, showing that scroll changes from the other tab are being applied to the new one too.
I solved this problem by logging in with configuration Ubuntu on Wayland instead of simply Ubuntu. Something like that. Image quality is low but you'll get the point.
That means I use Wayland instead of xorg but changing file /etc/gdm3/custom.config does not seem to solve the problem as stated here.