New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editor: scroll jumps randomly (related to Chrome, Electron, xinput) #28795
Comments
I'm getting a similar issue when Alt+Tabbing between windows. UPDATE: Issue still present with all extensions disabled. |
This also happens with the right sidebar (Explorer) sometimes, when Alt+Tabbing between windows. |
I've been experiencing this issue for a rather long time. I've never really put much thought into it, and it's not got worse; but I'm starting to really find this ever more frustrating. The actual impact to my productivity is beyond measure. I'll find that this happens intermittently, but frequently - in which I'll attempt to scroll in the current file, and suddenly I'm scrolled to a location way out of bounds to the input. (Eg; I'm attempting to scroll a few lines, and suddenly I'm at the end of the file). Some key thoughts may be;
I've deliberately left the version of Debian (Buster), and VSCode out of this note. I'm using latest of both, however this has most certainly been present for a long time. I'll endeavor to provide further constructive input in attempts to discover where the problem lies, and attempt to pay more attention when it happens. @ramya-rao-a & @rebornix - I would expect this impacts a lot more users than reported here, hence tagging you here. Just a matter of how long before they too come to this level of frustration. Edited; included additional information, tagged some people, and fixed some content. |
Same here, just couldn't find a way to reproduce it reliably. It is painful indeed. |
This is bugging me for quite some time, and I think I can reproduce it. It only happens (to me at least) if there is the mini search box at the top right corner of the editor. If I dismiss it, the scrolling disappears. EDIT: I'm on Windows & OSX. |
@tmtke So you have definitely had this happen on Windows? |
@dmblack Yes, it happened on Windows. |
...damn, I think it's not that consistent. maybe a combination of the search box and the inline reference lines. I don't know nothing now :/ |
I can confirm this behavior for Ubuntu 16.04, VC 1.18.1 if I switch between Chromium or Firefox back to VS Code. If switch back from Nautilus or Thunderbird for examples, everything works fine. |
I also experience this on Fedora 27 |
I can finally, and consistently, reproduce. I can also confirm this not only impacts browsers like Chromium, Firefox, and Google Chrome, but other open applications. I can even have no applications open, only my Desktop visible, and reproduce. For this example, simplified to ensure reliability; requirements: Browser (Chromium / Firefox / Google Chrome), VSCode Editor (Any file type. Ideally a long file to ensure the scroll is visible.)
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. @tmtke @mariusa Tagging you two, if you are able to please attempt to reproduce. Something tells me this is actually an Electron bug. Unfortunately; I don't have any other Electron apps to test with. Edit: I now have a Windows 10 box at home. Will endeavor to test and add results tonight. |
I was also able to reproduce this issue with Ubuntu 16.04. It doesn't matter what app I switch to (tested with Chromium, gedit) although I wasn't able to reproduce by scrolling on an empty desktop. I am not experiencing this with Windows 7. I do not believe that it has anything to do with find or extensions, because when I boot code with --disable-extensions and don't use the find feature, the issue still occurs consistently. Edit: I don't mean to imply that something is related without better testing, but the Electron/Atom team has a very similar issue that was reported to Atom: atom/atom#15482 The description is nearly identical. There are some suggestions there about switching to Wayland, using editor in a different workspace, etc. I was able to confirm that putting VSCode in another workspace stopped the issue from happening. This looks like at least in my case it's not a VSCode-specific issue at the moment. |
As @dmblack surmises, it appears that this is an Electron bug. A related Atom issue has provided steps to reproduce the issue. It seems that Electron is receiving scroll events of Chromium applications that are on top of the Electron application and then replaying them after a scroll event on the Electron application. Updating Electron seems to fix the issue though, so it's up to the vscode team to fix. |
@rebornix May we have your input (Tagging as it's assigned to yourself). Looks like this may be out of our hands otherwise.
Thanks all others involved so far! |
I'm having this issue. It's painful. VSCode is listening to mouse scroll event even while it is not active in the window. |
I came to learn that this is a bug from Chromium project and so affecting VScode for being based on electron which use Chrome engine under the hood. I just filed a bug: https://bugs.chromium.org/p/chromium/issues/detail?id=807187 Not sure if they are taking this seriously. |
I wonder if this really is an Electron bug. The Atom editor does not have this issue, and the current Atom version (1.23.3 ) is using a much older version of Electron:
vs code 1.19.3 :
If this is an issue in Electron, I suspect much more users would be impacted. I also use PlatformIO and wakatime as extenions, perhaps I should try to install my extensions one by one and see when the issue starts popping up. Anyway, this is becoming such a productivity drag that I don't see another option short of switching editors. If anyone has found a workaround, please share. update:
|
The issue is somehow related to libinput. As a workaround, you can replace the libinput with evdev, in ubuntu with xorg it's: |
@arenddeboer Regarding your 'scroll up' first notes; In my experience; the editor will scroll up or down, entirely depending on your behavior in other applications. As per my testing; I found that this was happening in any application, or even just my desktop - not just other 'Electron' applications. Regarding a workaround; there are some notes, kindly clarified by @Fullpan. I have not tested them, however; I'd be interested in your experience/result if you give this a go. Please pay close attention to their note regarding potential manual configuration of your mouse. @mariusa I'd encourage information or status updates by some of the appropriate developer stakeholders, but we do not seem to have much traction from them. |
@dmblack done |
The same here in manjaro gnome when I scroll in chrome and then I press alt+tab to vs code, the scroll put me the end. |
This happens consistently when using synergy. It's very annoying. Relevant issue: symless/synergy-core#6038 |
If you're using Ubuntu 17.10 with latest GNOME desktop environment you'll notice this bug too. I tried to install old Ubuntu DE "Unity" and use VSCode on it and I didn't noticed this bug. Everything worked as expected without any errors. Linux 4.13, X11 with GNOME (not Wayland session) |
Another victim of that bug here too, however I have been using zen mode and I'm getting a lower chance of that happening to me, also restarting chrome and VsCode seems in my case to help to "disconnect" the apps scroll events. System is manjaro KDE plasma 5 |
I also considered changing my OS when I first faced this bug (more than a year ago 😳). It would be so drastic that I preferred to create the extension instead. |
@lucasresck a personal thank you from me - you're a life saver. This is a great example of how open source fails but also how just one person can make a great difference for many people. 🙇🏻♂️ |
I appreciate your thanks! I would say that, if it weren't for open source, no solution would have emerged... |
@lucasresck Thank you so much! That bug drives me crazy. Perfect! |
@lucasresck ty |
Affects me, version 1.82.3, Ubuntu. No such thing happens in Sublime Text that I also use. Can't reproduce as written in the OP. But it happens every 10 minutes or so. |
Still hasn't been fixed? |
Alt+Tab Scroll Workaround extension doesn't work in Ubuntu 23.10 :( |
The extension recently received Ubuntu 23.10 (GNOME 45) support but it's not included in GNOME Extensions store yet --- I'm working on this. However, one can manually install it from GitHub: instructions. Let me know if it works for you! |
It works. Many thanks @lucasresck <3 |
Happy to share that extension's GNOME 45 (Ubuntu 23.10) support has just been added to GNOME Extensions store! To install it, just open Alt+Tab Scroll Workaround and click to turn it on! GNOME recently required all extensions to be manually updated to GNOME 45, therefore breaking this extension. Many thanks to @lbltavares and @ld-web who also worked in this update. |
So, let me get this straight, I need to patch my OS, to fix a bug that is from VSCode? Software development is going the right path 👍 |
@FeatureSpitter No? This is not a VS Code bug. If you didn't read the comments above yours, you can find a summary of it here |
It 100% is a VS Code bug: I use tons of other applications and none of them have this issue. That is the very definition of an application-specific bug. Now, it might well be a VS Code bug caused by a programming choice to rely on some sort of universal mechanism, where there's a bug in that universal mechanism ... but it still is a VS Code bug. |
@machineghost open any Chromium-based application, such as Discord, Chrome, MS Teams, VS Code, etc., then go somewhere in it that has text and a scrollable element, and scroll to near the middle of the full scrollable area. Open another Chromium-based application and do the same. In the first application window, select some text and drag it near the top or bottom of the element to cause crolling to happen. Do so until a significant amount of drag-based scrolling has happened. Then scroll back to where you where when you started dragging the text. Then alt+tab to the other Chromium-based application and scroll a little bit. I repeat- this is not a VS Code bug. If you're going to whine about software (especially that you don't pay money for), at least try to be informed enough to not make false categorization assertions. |
Indeed. It is a mixture of Electron and X11 not working that well together. Being that X11 is mostly abandoned I don't think we are in for a real bug fix other than the aforementioned extension any time soon. |
Again, I said Chromium. I don't know if it goes any higher up, but it at least goes a level up from Electron to Chromium. |
I also happens with Slack for eg. |
@starball5 You missed my point (which, admittedly, I didn't make as well as I could have). If I build a website with React, and React has a bug, I don't get tell my users "sorry, it's a React bug, not our problem". It doesn't matter if some other sites are broken also; our site is broken, while most other sites aren't: it's our bug. If I need to go file a ticket for the React folks to get the bug fixed, or do whatever else, then that's what I need to do to fix our bug. |
Thank you very much. It was very frustrating for me and thought it was VS code's issue. |
Happy to help, @Sanan4li! Please notice that GNOME 45 support is already out in the GNOME Extensions store. |
I believe the root cause is as I explained here: https://issues.chromium.org/issues/41251816#comment79 |
У меня такая же проблема на windows 10 и fedora 39 |
7 years, and this bug still has not been fixed. Happens every time I scroll on Chrome or Vscode, and then alt+tab between them. |
Are you fucking seriously expecting me to install an extension just so I can scroll properly? Wtf is Linux life man. |
Looks like VS Code is listening to mouse scroll events, even while it is not active in the window.
Related:
https://bugs.chromium.org/p/chromium/issues/detail?id=608246
https://bugs.chromium.org/p/chromium/issues/detail?id=807187
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.
The text was updated successfully, but these errors were encountered: