Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS code randomly decides to scroll down

I just started working with VS Code and I'm having trouble with this problem. I'm just writing a code on one line, and the slider decides on its own to go down to the bottom of a cell. It stops doing that when I close VS code and go back in, but after a few minutes it would do the same thing.
Update 1.
Looks like "command + a" is scrolling down a cell as well for some reason. I checked the keybindings but it's not there. Also, it scrolls down a page when I click on a certain line sometimes, but I can't replicate it. It's very random.

Update 2.
I disconnected my mouse and I also disabled all the extensions except for Python. The problem continued. It seems like there are some lines that result in the slider to go up or down (usually down to the bottom of the cell). It's not only for clicking, I tried using the "left"/"right" keys on my laptop on those random lines, and the slider is doing the same thing. Though again, when I close VS code and open it back in, those same lines cause no problem.
Update 3.
I uninstalled vs code entirely and reinstalled it. Problem still exist.
Update 4.
I'm starting to think that it may be related to empty spaces. There was a line that caused the issue (I clicked on it and it scrolled to the bottom automatically), and when I removed the empty line above it, it stopped. I'll try to replicate it when I'll see it again.

like image 713
Penguin Avatar asked Apr 10 '26 06:04

Penguin


1 Answers

Ensure this is false

"python.dataScience.alwaysScrollOnNewCell": false

Another possible issue is that sensitivity is too high

"editor.mouseWheelScrollSensitivity": 1

Maybe command + a is scrolling because it is selecting all text, or you overrode a setting. Make sure to check vscode keybinds and your mac's.

Also, ake sure that this scrolling isn't because of you accidentally hitting the touch pad is you are on a lap top. This happens frequently for me. Even if I apply too much pressure beside my touch pad it does strange things.

I'm guessing you are editing a local file not accessible to someone else. If they save their file vscode may scroll some while you are typing.

If all else fails, you can try reinstalling to see if that changes anything

like image 143
Brandon Kauffman Avatar answered Apr 12 '26 18:04

Brandon Kauffman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!