-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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: https://github.com/symless/synergy-core/issues/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 |
Are you fucking seriously expecting me to install an extension just so I can scroll properly? Wtf is Linux life man. |
This used to be buggy for be but both VS Code and Chrome no longer show this behaviour for me. I'm using XFCE so I don't know if the workaround is applied by Blink or my window manager. It's clear that Blink ignores first scroll event after window focus, which is not optimal but better than random scrolling. |
Dunno what Blink is, but I’m still getting the issue on my (arguably old) XFCE (4.14). |
I have this issue on Ubuntu 22.04 switching between Chrome and VS Code. This gnome extension seems to fix it: Ubuntu: Chrome: VS Code: |
Still have this problem with VSCode 1.89.1 on Debian Bookworm (12). |
Possible alternative direction:
This issue can quickly turns a developer life into a nightmare though :/ |
Have you tested the Alt+Tab Scroll Workaround GNOME Extension? |
Salut Éric, Thanks for the information! The bug does indeed occur with X11 but not with Wayland on my system. In my experience, the "Alt+Tab Scroll Workaround" Gnome extension makes things much better but is not a perfect fix. I had a few instances of erratic scrolling with the extension. Not with VS Code / Chrome but with other applications which did not have scroll problems without the extension. Like for example the Settings app. Cheers, |
Please report this as an issue in the extension's repository so that we can sort this out. Thank you! |
Hi Lucas, I saw the view jump unexpectedly in the settings app so I instantly though about the work-around. But I can't reproduce it at will and may have attributed it a bit quickly. I don't think I have enough data for a meaningful ticket right now. |
Having the same issue on Fedora 40 (Xorg).
|
At least I'm not alone on this one.. Ubuntu 22.04. |
The If this Another question: does this issue affects only gnome users? Or kde as well? Here's my ".*"
None, Up, Button4, 1
None, Down, Button5, 1
None, Thumb1, Alt_L|Left
None, Thumb2, Alt_L|Right
Control_L, Up, Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L, Up, Shift_L|Button4
Shift_L, Down, Shift_L|Button5 And this is the desktop entry on [Desktop Entry]
Type=Application
Name=Imwheel VSCode
Exec=imwheel --kill --buttons 4 5
Comment=Fix VSCode scroll
X-GNOME-Autostart-enabled=true |
The Alt+Tab Scroll Workaround is also not always working for me anymore. Sometimes it fails, but I cannot identify when/why it fails. When it fails, it seems that I have to disable/enable the extension to work again. |
Dunno for KDE, but considering that I have this issue on XFCE (which has not migrated to Wayland yet and cannot use Gnome extensions AFAIK), I wouldn’t be surprised if KDE was affected as well. |
@DGolubets and @gersonjferreira, thank you for your feedback. Please, open an issue at the repository so that we can investigate this. |
@lucasresck, I would... but I wound't know what to report, since I cannot identify when/why it happens. It just sometimes fails. Is there a way for me to check if the extension is running on |
@gersonjferreira, I'm not sure... We would need to investigate a little bit more. A possible way could be logging each time the extension is triggered. But, in either case, if you want to follow up with this, taking this issue to the repository seems to be more appropriated. |
I know it's likely an Electron bug, but can you please just fix this in VSCode? Just throw away scroll events when the window gains focus. This is so massively infuriating and such a longstanding issue. If any of the developers had this issue for a single day I would guess it would have been fixed already. It is one of the most annoying bugs I ever encountered. |
Indeed! I've actually moved from VSCode to PyCharm because of this bug. I'm using the free academic license of PyCharm Pro. It's working perfectly and I don't miss VSCode at the moment. The PyCharm interface runs clean and now I try hard to avoid anything that uses Electron. |
Wow! I was looking on the internet for anyone with the annoying problem I'm experiencing but was looking at more recent issues. Can't believe this is a 7-year old annoyance! Edit: looks like it may be helpful to vote for these fixes: Looks like the best course of action for now is install the work around by @lucasresck: |
The same happens in VSCodium. Super annoying. |
Probably nearly every Electron-based app is affected. Heck, even in Slack, sometimes I get teleported far down the list of recent threads. On XFCE I alleviate this by placing each affected app on a workspace (or physical screen) of its own, so that nothing overlaps it. This could be a strategy for other desktop environments as well, if you can’t use the aforementioned Gnome extension. |
@mminot-yseop Thanks, I installed the Gnome extension. As for Slack, I use the web version, so I have no such problem. |
The last update of the vscode in both ubuntu 22.04 and debian 12 caused this error too in my cases. I don't know if it is related but both the problems are occured after I just installed the |
I switched to KDE (Kubuntu) because of this. No scrolling problem there (but I miss my lightweight MATE desktop...) |
XFCE + picom also implements a workaround for this issue and is even more lightweight desktop than MATE. |
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: