PejmanNik / vscode-autoScroll

AutoScroll extension for VS Code
https://marketplace.visualstudio.com/items?itemName=pejmannikram.vscode-auto-scroll
MIT License
23 stars 6 forks source link

Unexpected scrolling when Command-clicking or saving since VS Code v1.65.0 #18

Closed effektsvk closed 2 years ago

effektsvk commented 2 years ago

Hey, I'm assuming that some APIs broke since the version 1.65.0, whenever I hold Command and hover over some text that is clickable, it automatically scrolls to the bottom. This also happens when I just do Command+S to save.

My files are .tsx and .ts, not sure if that has something to do with it. I'm not sure how to properly replicate it, if you need more info just let me know.

Niphyr commented 2 years ago

Experiencing the same behaviour with .js, .md and .mdx files with VS Code v1.65.1 (windows) and I save the document.

PejmanNik commented 2 years ago

Hi, Thank you for reporting the issue, in your .tsx and .ts file, in the bottom toolbar, there must be an AutoScroll Button and status, is it active?

image

effektsvk commented 2 years ago

@PejmanNik Yes, I can confirm that it was only occurring when this was active

PejmanNik commented 2 years ago

Please check with the last version (1.1.0); it must have been fixed. Feel free to reopen the issue.

effektsvk commented 2 years ago

Hey, unfortunately, I'm still experiencing the issue...

PejmanNik commented 2 years ago

Can you please take a screenshot from the VSCode toolbar? did you try to reactive the Auto-scroll for that file?

Niphyr commented 2 years ago

I am also still having the same problem. Version 1.1.0 of AutoScroll, Last updated 3/20/22. VS Code v 1.65.2.

image

Every time I save a document with AS ticked, it jumps to the second to last line of the file.

PejmanNik commented 2 years ago

Click on the AS so it will be disabled for that file. Did you manually active it? What is your file extension?

effektsvk commented 2 years ago

I have the same version as @Niphyr, here's a video of the issue. I also tried to replicate it and looks like these steps should be able to replicate it:

  1. open new VS Code window
  2. create empty file and insert some lines
  3. save it
  4. turn on AutoScroll
  5. click to insert cursor into left editor somewhere on the start
  6. save file - here you should get scrolled down to second to last line

If that doesn't replicate it, you can try to open another file in a different tile so you have two editors next to each other.

https://user-images.githubusercontent.com/10141960/160366227-056d8b35-ce04-4e81-b040-f63982d43df3.mov

PejmanNik commented 2 years ago

It is how this extension works. Any changes on the file cause scroll down. Why do you active it on this file? It will be active/deactivated per file. You need to activate it for log files only, and it will remember this next time you open that file.

Niphyr commented 2 years ago

Deactivating AS for the specific extension I was having issues with resolved the issue for me.

effektsvk commented 2 years ago

Yes, but for some reason this wasn't an issue until VS Code v1.65.0. Also I believe the auto scroll was enabled by default, because it started happening out of nowhere.

I mean, we can probably close this, I don't mind, but is the enabled state persisted? I think I'd prefer it to be always disabled by default. Or there could be a setting for extensions which are always enabled.

PejmanNik commented 2 years ago

@effektsvk Based on the design it must be disabled by default for all extensions unless it is a log file, the active/deactivated will persist for each individual file.

yes, something breaks the logic and I like to solve the problem so now if you open any non-log file the plugin is active by default?

effektsvk commented 2 years ago

I tried creating new .txt, .js and .log file and it was turned off by default on all of them, so it should be fine. :)

PejmanNik commented 2 years ago

ok then, Thank you