vscode: Can't drag scroll bars anymore
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.56.2
- OS Version: Debian 10
Steps to Reproduce:
- Open any file longer than the display height
- Try to drag the scrollbar or left-click in a empty scrollbar section.
- Expected: drag-to-scroll, or scroll immediately to the clicked position.
- Actual: no scroll.
Apparently the scrollbar is “missing” the click event. Clicking on the scrollbar is actually sending the click in the current editor itself. I can see the change in the opacity of the scroll indicator, however on click-and-drag VSCode is selecting text from the editor pane instead of scrolling.
Also, left-clicking everywhere over the scrollbar is not scrolling (the correct behavior is to scroll up to the click position immediately). The only way to scroll immediately on click is to use the right click.
No problem scrolling using mouse scroll wheel, or clicking over the minimap.
Currently I went back to 1.55.2 and the issue is not yet there. I also tried in 1.56.0 and the issue is present, so the bug was introduced somewhere between these two versions.
My current desktop environment is Debian 10 with Fluxbox. I tested with a clean install (I removed .vscode
and .config/VSCode
dirs). I also tried hiding the minimap. No effects, the issue is still there.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 27
- Comments: 48 (4 by maintainers)
run code with --disable-features=SendMouseLeaveEvents
same problem https://bugs.chromium.org/p/chromium/issues/detail?id=713746
I hit a somewhat similar issue on icewm (on Debian 11) : it occurs after switching windows (using keyboard or mouse). So the workaround is simple : switch virtual desktops or iconize-raise VScode.
I confirm it does not occur on 1.55.2. It does not occur using openbox WM.
lol, once mac users have this issues, they’re gonna take this issue seriously now
Certainly still an issue with:
Same issue here. Using Arch Linux, installation data:
I noticed they start working if I make some clicks inside the file I want to scroll.
I can confirm the behavior running Manjaro and KDE Plasma 5.21.5. Switching to Gnome 40 on the same computer and scrolling works as expected. VS code is the only application I see this issue.
^ 1.83.0 still very much broken over here
Works with the special flag:
I came up with a way to reproduce this on linux with a minimal window manager. It seems to be related to some interaction that happens with the window manager wants to grab button presses with XGrabButton and then pass those through with XAllowEvents.
First, run Xephyr:
Run vscode:
At this point, all scroll bars are working. I’ve checked the terminal scroll bar, editor scroll bar, and the extensions one.
Here’s an example wm:
To compile it:
Run the example window manager:
At this point, the editor scroll bar and extensions scroll bars no longer work. The terminal one continues to work.
We can use some other tools to gather more information:
We can get the window id of vs code by running:
Click on vs code inside Xephyr. It should display the window id.
With this, we can print xevents with xev:
When trying to scroll by clicking on the bar, I get the following output:
I think the thing that’s throwing stuff off here is the LeaveNotify and EnterNotify. If you now kill the window manager, the scroll bars should correctly work again. Looking at xev, the LeaveNotify and EnterNotify events wont keep repeating, and only:
I am facing same problem with my Debian 11 KDE plasma.
Some window managers, e.g. Fluxbox, send LeaveNotify/EnterNotify on click to ensure “activate window by click” feature. So sequence is:
It’s not a problem if application handles these events correctly. Internal flag indicating button pressed should be set on ButtonPress and reset on ButtonRelease events only. But if application (or underlaying library) reset the flag on LeaveNotify/EnterNotify, we observe such weird behavior: button press is ignored.
I’m still having this issue on 1.73.1, Ubuntu.
I’ve noticed if I keep the minimap enabled, I can click to scroll, thus putting a band-aid on the issue. Hopefully that helps others who are currently pulling their hair out!
As of latest update the
--disable-features=SendMouseLeaveEvents
workaround doesn’t seem to work anymore 😞 .No, the issue is not present in Chromium. I’m using Chromium
Version 90.0.4430.212 (Developer Build)
. Shall i test that page with Chromium 89?