microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.41k stars 29.33k forks source link

Linux: native context menu runs action under mouse when opened #113175

Open thwaller opened 3 years ago

thwaller commented 3 years ago

Issue Type: Bug

When I right click, the menu will flash on and then off almost immediately, like maybe 100 or 200 milliseconds. This is not all the time, but I am not able to narrow it down. It seems to be only in the editor that this issue exists. I can sometimes "fix" it by right clicking on the left side, like in the Explorer, then going back to the editor. I do not have this issue with any other software on my system. This started maybe Wed this last week, so approx around Dec 16th.

I removed 2 SCSS extensions which I believed were at fault, but with them uninstalled, the problem still exists. Those were my most recently installed extensions, the rest have been there a while.

Regarding what happens, when the right click menu disappears it seems like an option is being selected, almost like there is some sort of double click happening... the first right click to open the menu and a second to select something. I believe this to be the case as different things happen after I right click that normally require me to explicitely call said function.

VS Code version: Code - Insiders 1.53.0-insider (c927a8015b9e26bd454d6e293bb0384aa1975d06, 2020-12-18T05:27:50.274Z) OS version: Linux x64 5.4.0-59-generic

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz (8 x 2799)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|0, 0, 0| |Memory (System)|31.32GB (0.37GB free)| |Process Argv|--no-sandbox --unity-launch --crash-reporter-id 99855e03-cc37-4ed5-907b-28a1bf4d8453| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|mate| |XDG_CURRENT_DESKTOP|MATE| |XDG_SESSION_DESKTOP|mate| |XDG_SESSION_TYPE|x11|
Extensions (68) Extension|Author (truncated)|Version ---|---|--- html-snippets|abu|0.2.1 scss-lint|ada|0.1.10 project-manager|ale|12.0.1 code-gnu-global|aus|0.2.2 emojisense|bie|0.8.0 markdown-checkbox|bie|0.1.3 xml2json|bui|1.2.4 npm-intellisense|chr|1.3.1 path-intellisense|chr|2.3.0 vscode-mysql-client2|cwe|2.8.6 vscode-markdownlint|Dav|0.38.0 vscode-eslint|dba|2.1.14 githistory|don|0.6.14 xml|Dot|2.5.1 gitlens|eam|11.0.6 vscode-html-css|ecm|1.2.1 vscode-npm-script|eg2|0.3.13 apacheconf-snippets|eim|1.3.0 git-project-manager|fel|1.7.1 php-intellisense|fel|2.3.14 vscode-firefox-debug|fir|2.9.1 shell-format|fox|7.0.1 vscode-pull-request-github|Git|0.22.0 beautify|Hoo|1.5.0 vscode-git-add-and-commit|iva|2.1.1 search-node-modules|jas|1.3.0 shortcut-menu-bar|jer|1.5.0 vscode-gnupg-tool|JHe|1.3.9 vscode-sshfs|Kel|1.19.1 sftp|lix|1.12.9 code-beautifier|mic|2.3.3 xml-format|mik|1.0.2 prettify-json|moh|0.0.3 vscode-apache|mrm|1.2.0 python|ms-|2020.12.424452561 vscode-pylance|ms-|2020.12.2 jupyter|ms-|2020.12.414227025 cpptools|ms-|1.1.3 debugger-for-chrome|msj|4.12.11 sqltools|mtx|0.23.0 vetur|oct|0.31.3 java|red|0.73.0 vscode-xml|red|0.14.0 shellman|Rem|4.7.0 live-sass|rit|3.0.0 LiveServer|rit|5.6.1 bash-debug|rog|0.3.9 joplin-vscode-plugin|rxl|0.3.0 bash-beautify|sha|0.1.1 markdown-preview-enhanced|shd|0.5.13 html5-boilerplate|sid|1.1.1 sonarlint-vscode|Son|1.19.0 code-spell-checker|str|1.10.2 html-preview-vscode|tht|0.2.5 shellcheck|tim|0.12.2 vscodeintellicode|Vis|1.2.10 vscode-java-debug|vsc|0.30.0 vscode-java-dependency|vsc|0.16.0 vscode-java-pack|vsc|0.12.1 vscode-maven|vsc|0.27.0 codetour|vsl|0.0.42 gistfs|vsl|0.1.12 nodejs-extension-pack|wad|0.1.9 eno|Wsc|2.3.41 JavaScriptSnippets|xab|1.8.0 markdown-all-in-one|yzh|3.4.0 html-css-class-completion|Zig|1.20.0 ab-html-formatter|zov|0.0.2
sbatten commented 3 years ago

@thwaller what is almost certainly happening is that the menu is being drawn underneath the mouse cursor and that is activating the menu since the mouse up action triggers the item. we can't prevent that mouse up action from triggering as these are native menus, but we can try to fix the position (we already do try but there seems to be a consistent case you are hitting). if you could reproduce and take a short video, that would be helpful.

thwaller commented 3 years ago

Please see a right click attempt that worked, then one that did not, then one that did in the video.

Side note: I was disappointed to see that MKV files cannot be uploaded.

EDIT: Before anyone comments, I have no issue with showing the credentials, they are only temp during this process.

https://user-images.githubusercontent.com/13359198/102859911-7a6c5a00-43f2-11eb-8fdf-a5cba1807989.mp4

thwaller commented 3 years ago

Interesting. For me, I have tried what you suggest and attached a video of a series of right clicks at different lengths of time pressing the button down. For me, it did not seem to make a difference, it just changed how fast the menu disappeared. Also note that in this video you can see the mouse cursor is not moving, it is just a series of right clicks.

https://user-images.githubusercontent.com/13359198/103209266-48faff00-48c8-11eb-889e-f2efa50b9e58.mp4

sbatten commented 3 years ago

@deepak1556 if you get a chance, maybe you could help me with this some time. It seems even with the same coordinates on our side, the menu is sometimes still drawn under the cursor on linux and I am not sure we can do any more about it.

yume-chan commented 3 years ago

@sbatten How about always using custom menus, but still allow title bar style to be switched between native and custom?

bogdanbeniaminb commented 3 years ago

Yes, using custom menus does help, but it creates other issues for my workflow. One is that I can no longer hide the title bar, as I currently do with the native one (I'm using Linux/KDE). The other is that the menus are much, much larger, to a point where using them means scrolling through the list of options and this makes the workflow more difficult.

I understand some have had this issue years ago as well (I found a github issue opened 4 years ago), but for me personally it only appeared in VSCode 1.53. I reverted back to 1.52 and it's working fine again. It seems to be something related either to the Electron version used in 1.53 or to VSCode itself.

For me personally, using the "custom menus" workaround doesn't seem a solution. I would rather prefer this issue is investigated and fixed, as you would normally do with bugs.

Thank you.

thwaller commented 3 years ago

I understand some have had this issue years ago as well (I found a github issue opened 4 years ago), but for me personally it only appeared in VSCode 1.53. I reverted back to 1.52 and it's working fine again. It seems to be something related either to the Electron version used in 1.53 or to VSCode itself.

I agree with this statement. This issue is "new" for me as well. There was a change somewhere that caused this issue, at least for some of us.

IvanSafonov commented 3 years ago

I have the same issue with VS Code 1.53. And it also works normal in 1.52.

Version: 1.53.0
Commit: 8490d3dde47c57ba65ec40dd192d014fd2113496
Date: 2021-02-03T15:56:04.185Z
Electron: 11.2.1
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Linux x64 5.4.0-65-generic
jayschwa commented 3 years ago

For me, this problem happens when I right-click in a central area of my window. If I right-click near an edge, the menu does not spawn under the pointer hot spot.

hofingermarkus commented 3 years ago

I have the same problem on VSCode 1.53.2 on Ubuntu 18.04 64bit

My Quickfix solution to use VSCode even thouhg it has the bug, is to not right-click but to right-hold. Then the context menu shows up and stays as long as one holds the right button pressed As soon as you release the right mouse button, the lift event seems to click the currently selected line on the context menu - even though the event comes from the right mouse button.

Maybe it could be possible to implement a locking mechanism. I.e. when the mouse up action triggers the context menu, the callback code checks that the according mouse button is truly different from the one that triggered the context menu. In this way the same click should not be able to trigger it.

acim commented 3 years ago

Same here, Linux Mint 20.1, Firefox 85.0.1, VSCodium 1.53.2. And yes, it started not that long ago, maybe a month or two. Same happens in Parallels on Mac, then same versions of Mint, Firefox and VSCodium.

deepak1556 commented 3 years ago

I am trying to repro the issue,

Couldn't see the issue with both native and custom context menus. Can anyone provide exact repro steps along with a sample workspace, also please provide the value of XDG_SESSION_TYPE.

acim commented 3 years ago

I am trying to repro the issue,

* Ubuntu 20.04 with x11

* CentOS 8 with x11

Couldn't see the issue with both native and custom context menus. Can anyone provide exact repro steps along with a sample workspace, also please provide the value of XDG_SESSION_TYPE.

Do you have some extension that add stuff to the context menu? Like GitLens, Go...

deepak1556 commented 3 years ago

Do you have some extension that add stuff to the context menu? Like GitLens, Go...

No, the test was done without any extensions.

I have installed gitlens now and still doesn't repro the issue. Can you start with code --user-data-dir /tmp/code-test which will setup the app with fresh configuration and if you can repro the issue here, please provide the steps.

Side note, can you check if the issue repros with code --disable-gpu ?

acim commented 3 years ago

Do you have some extension that add stuff to the context menu? Like GitLens, Go...

No, the test was done without any extensions.

I have installed gitlens now and still doesn't repro the issue. Can you start with code --user-data-dir /tmp/code-test which will setup the app with fresh configuration and if you can repro the issue here, please provide the steps.

Side note, can you check if the issue repros with code --disable-gpu ?

I tried this and it seems to work fine. I suspect to zoom level now. When I just start code without flags (old setup) and set zoom level back to zero, it behaves better but I will need more time to prove this.

bogdanbeniaminb commented 3 years ago

Do you have some extension that add stuff to the context menu? Like GitLens, Go...

No, the test was done without any extensions.

I have installed gitlens now and still doesn't repro the issue. Can you start with code --user-data-dir /tmp/code-test which will setup the app with fresh configuration and if you can repro the issue here, please provide the steps.

Side note, can you check if the issue repros with code --disable-gpu ?

You need some extensions to add items to your context menus. The issue only appears when the context menu appears under the mouse cursor - you need enough items in the context menu or a screen that is short enough (in height) so that the context menu can't go up or down, avoiding the mouse cursor.

justinleebehnke commented 3 years ago

I am so grateful for all of you reporting on this issue and also for those who are working on this issue and repo.

I am on Ubuntu 20.04.1 LTS x86_64 VSCode version 1.53.2

BEFORE (sorry I don't know which release it started happening but it was within the last 2 weeks)

What used to happen when I right-click is the menu would appear and then I can left-click to select what I am looking for.

AFTER

Now what I need to do is right-click and HOLD while I move my cursor off of the pop-up window menu, THEN release right-click, and then I can left-click on the thing that I want to choose.

Another option is to hold the right-click down until I have my cursor pointing over the thing that I want to select and then release right-click and it will select that item

What I believe is happening is the release of the right-click when a menu is opened is being interpreted as a selection.

I believe that before it was opening the menu on "mouse up" from right-click and NOW it is opening the menu on "mouse-down" of right-click and therefore entering selection mode and interpreting "mouse up" as a selection.

That's just what I am perceiving and I hope it is helpful. (I find it very unnatural to move my cursor while holding right-click on my laptop)

acim commented 3 years ago

After I disabled zoom, it works fine on my laptop (two fingers touch).

lephuongbg commented 3 years ago

I think this issue is due to VS Code does not work well with high DPI settings. I set my font DPI to 120 so that things are not super tiny on my screen and this issue consistently happens. If I set my font DPI to default then the problem goes away. One would have thought that since Chromium doesn't have this issue, VS Code shouldn't also have it.

image

JSKenyon commented 3 years ago

After I disabled zoom, it works fine on my laptop (two fingers touch).

This seems to have worked for me too.

jibbers42 commented 3 years ago

For me, this seems to happen only when zoom is enabled. This bug is actually pretty serious since the behavior is unpredictable - it simply depends on what menu item your cursor happens to be over. Luckily there isn't much too destructive by default (especially if under source control), but what might someone have from an extension?

Some info:

"window.zoomLevel": 0.33

Version: 1.53.2
Commit: 622cb03f7e070a9670c94bae1a45d78d7181fbd4
Date: 2021-02-11T11:48:44.518Z
Electron: 11.2.1
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Linux x64 5.8.0-43-generic

Ubuntu 20.04.2 LTS
deefdragon commented 3 years ago

Mostly a +1 but if it helps, this only happens to me when I am zoomed in (ctrl -) twice I think? And only if the menu is touching the bottom of the screen.

YalandHong commented 3 years ago

I encountered this problem in VSCode 1.54 (lastest version). This is quite an annoying problem making right-click menu completely unusable. So I downgraded my VSCode back to 1.52.

Then I found that the cursor would still hover on the item beside, but not activate or execute it.

vscode_bug

However, if I right click and hold for a short time, the item will be executed upon release.

jamazi commented 3 years ago

For me, this seems to happen only when zoom is enabled. This bug is actually pretty serious since the behavior is unpredictable - it simply depends on what menu item your cursor happens to be over. Luckily there isn't much too destructive by default (especially if under source control), but what might someone have from an extension?

Some info:

"window.zoomLevel": 0.33

Version: 1.53.2
Commit: 622cb03f7e070a9670c94bae1a45d78d7181fbd4
Date: 2021-02-11T11:48:44.518Z
Electron: 11.2.1
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Linux x64 5.8.0-43-generic

Ubuntu 20.04.2 LTS

Confirmed, happens only when window.zoomLevel changed.

drjasonharrison commented 3 years ago

@jamazi suggested the issue might be the window.zoomLevel, I used user settings to set it to 0, and control- and control+ to adjust it. I found that the menu needed to touch the bottom of the screen (not window), and be in the white space between column zero and the code to trigger the "auto dismiss" on right button release.

So with code like:

class A:               # line 1
    def b(self):       # line 2
        if c:          # line 3
            if d:      # line 4
                d = d  # line 5

#column:
#000000001111111111
#234567890123456789

save it as "whatever.py" and split the window down so you have two copies of the file open, adjust your vc code window so it's like 80% coverage of your screen, and not touching the edges of the screen. Open user settings and set the zoom level to 0. Right click to your hearts content.

Now press control-minus to zoom down, and right click again in these locations:

It is really hard to find why the menu stays up, sometimes it seems like one column is more likely to keep the menu up, but it's hard to find the exact x,y click position. I sort of think that the magical pixel column is associated with the text cursor. I don't think it would be helpful to adjust my mouse movement settings to further narrow this down as I don't know if this is a zooming + cursor + mouse click math issue or something else.

Work around looks like setting window.zoomLevel = 0.

Version: 1.54.1
Commit: f30a9b73e8ffc278e71575118b6bf568f04587c8
Date: 2021-03-04T22:38:50.094Z
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Linux x64 4.15.0-136-generic
Ubuntu 18.04 LTS

Based on comment by @jayschwa

"editor.fontFamily": "'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'"
"editor.fontSize": 16
jayschwa commented 3 years ago

A zoom level of zero does not fix this problem for me. I do use a font size of 16, so maybe that also impacts it.

admirabilis commented 3 years ago

Zeroed zoom level fixes the problem, but now I cannot see anything! Not until UI font sizes are configurable!

drjasonharrison commented 3 years ago

@teresaejunior you can set the font size using "editor.fontSize": 16 and debug.console.fontSize and markdown.preview.fontSize and "terminal.integrated.fontSize": 16

admirabilis commented 3 years ago

@drjasonharrison Thanks, but I'm referring mostly to https://github.com/microsoft/vscode/issues/519

appy-one commented 3 years ago

Ironically, my right click issue was resolved once I connected a different mouse. Right clicking the vscode terminal window to paste a copied command made me realize it almost always pasted it twice. Apparently my 'old' mouse triggers multiple events with each right click..

EDIT: I tested what events my old mouse sends at https://unixpapa.com/js/testmouse.html Pressing down the right mouse down (without releasing) immediately sends 'down','up' and 'contextmenu' events, so this confirms my mouse being defective. I don't know why though, I've only had it for like... 20 years?

scottfurry commented 3 years ago

This problem is "new to me" and appeared recently after an upgrade to 1.54.3.

Version: 1.54.3
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Linux x64 5.4.97-gentoo-x86_64

If the context menu becomes "problematic" when cursor is in code, a reload tends to solve the matter.

However, context menu is consistently misbehaving (not staying open) when cursor is in block comments (either single or double quotes) or quoted text. Reloading has no effect.

One thing I have found to workaround the problem is to hold the right mouse button down and move the cursor out of the bounded region that is the context menu. This "tricks" vscode that no selection from the context menu has occurred. The context menu can then remain open and the right mouse button can be released. Other selections can be made then.

hiredtocode commented 3 years ago

I came here because my bug report was a duplicate of this one. I think I know exactly what's happening with mine. Basically the right click menu "window" is spawning "underneath" my mouse pointer.

I have my side bar to the right and when I right click one of the folder/file or whatever the menu pop up window spawns to the left of my mouse pointer. So, if I click the right button and not let go, move my pointer a little to the right and let go of the mouse button will leave the pop up menu window open since it didn't trigger anything on mouse-up event.

So, the solution to the fix is to make the pop up menu window to pop up further away from the pointer. Maybe 3px or 5px whichever location it's going to spawn.

guigagb commented 3 years ago

i have the same issue in:

Version: 1.56.0 Commit: cfa2e218100323074ac1948c885448fdf4de2a7f Date: 2021-05-04T21:58:14.757Z (1 wk ago) Electron: 12.0.4 Chrome: 89.0.4389.114 Node.js: 14.16.0 V8: 8.9.255.24-electron.0 OS: Linux x64 4.10.0-38-generic

HasheebKazi commented 3 years ago

This bug hasn't been fixed in the latest update. Using Ubunto 20.04 and Version 1.56

PremiumUsername commented 3 years ago

Zeroed zoom level fixes the problem

Same. It's easy to reproduce this bug for me. Increase the zoom --> right click menu always malfunctions. Set zoom to default ---> no problems at all.

hiredtocode commented 3 years ago

Zeroed zoom level fixes the problem

Same. It's easy to reproduce this bug for me. Increase the zoom --> right click menu always malfunctions. Set zoom to default ---> no problems at all.

I confirm, today I had no issues and was wondering why and found out that I zoomed OUT earlier. Which means if we zoom in, the pop up window starts to touch the mouse pointer. If we can make the pop up window spawn FROM the mouse pointer OR make it immune to zoom-in so that the pop-up window's location is always the same.

jseto commented 3 years ago

I think is a problem with the context menu border or context menu active area. If you right-click and keep the mouse button clicked you can experience 3 different behaviours:

  1. Moving the mouse cursor away from the context menu and release button The context menu stays visible and behaves as expected
  2. Leaving the mouse cursor at the same position and release button It can activate the closest context menu option and close the context menu or behaving as 1. The first being the most likely to happen.
  3. Moving the mouse button towards the context menu and release the button It will activate the closest context menu option as expected

Having a thicker border or a narrower context menu active area will solve the problem as the mouse cursor will be away from the active area.

This bug is only in the editor window. The explorer panel works always as expected.

isapir commented 3 years ago

I can confirm that the issue is affected by the Zoom level. With zoom level 1 there is no issue: image

But with zoom level 2 the context menu is closed immediately after opening.

Version: 1.56.0
Commit: cfa2e218100323074ac1948c885448fdf4de2a7f
Date: 2021-05-04T21:58:14.757Z
Electron: 12.0.4
Chrome: 89.0.4389.114
Node.js: 14.16.0
V8: 8.9.255.24-electron.0
OS: Linux x64 5.8.0-50-generic
ghost commented 3 years ago

Same issue using Ubuntu 21.04 and latest VScode

daravi commented 3 years ago

I have been trying to ignore this issue for the past 5 months, but it is really degrading my productivity when all of a sudden, my editor starts a Find All References (heavy computation btw), or jumps to a symbol definition in a different file when I didn't meant to. This is becoming really annoying and really diminishing the usefulness of my editor.

Please fix this as soon as possible already. You have had half a year to repro and fix this. Any one of these would work really:

Just push a fix and then try to investigate further if you cannot fix it in a satisfactory manner. I have had to ctrl+z many times to undo unwanted changes caused by this bug and I am regretting the time I have invested into this editor.

scaomath commented 3 years ago

Interestingly, this bug still happens to me even when Zoom level is 1.

More interestingly, this bug is present for Python and Julia. But when writing LaTeX and Markdown, it is fine.

My version is as follows and I am on Ubuntu 20.04 as well.

Version: 1.56.2
Commit: 054a9295330880ed74ceaedda236253b4f39a335
Date: 2021-05-12T16:45:26.313Z
Electron: 12.0.4
Chrome: 89.0.4389.114
Node.js: 14.16.0
V8: 8.9.255.24-electron.0
OS: Linux x64 5.8.0-44-generic snap
Reston commented 3 years ago

I'm having this issue too Ubuntu 20.04


Version: 1.56.2
Commit: 054a9295330880ed74ceaedda236253b4f39a335
Date: 2021-05-12T16:45:26.313Z
Electron: 12.0.4
Chrome: 89.0.4389.114
Node.js: 14.16.0
V8: 8.9.255.24-electron.0
OS: Linux x64 5.4.0-73-generic snap
piyushsingariya commented 3 years ago

Guys, we need a fix for this. This is killing me. I am on Kubuntu 20.04

huypn12 commented 3 years ago

Try starting vscode with --force-device-scale-factor=1. For me it looks like the parameter solves the issue, or at least makes it less annoying.

lucasfcnunes commented 3 years ago

Same issue here Ubuntu 20.04

Version: 1.57.0 Commit: b4c1bd0a9b03c749ea011b06c6d2676c8091a70c Date: 2021-06-09T17:18:42.895Z Electron: 12.0.9 Chrome: 89.0.4389.128 Node.js: 14.16.0 V8: 8.9.255.25-electron.0 OS: Linux x64 5.8.0-55-generic snap

@huypn12, --force-device-scale-factor=1 didn't change much...

WXZhao7 commented 3 years ago

I fix this bug by closing the zoomLevel. // "window.zoomLevel": 0.25, and setting tweaks-Fonts-Scaling_Factor:1.00. This is my issue: https://github.com/microsoft/vscode-python/issues/16509#issue-923626434

ifarafontov-clj commented 3 years ago

The issue disappears with resetting the zoom level. But I can not see anything in the Explorer now =) Still better than always hold the right button though.

Version: 1.56.2 Commit: 054a9295330880ed74ceaedda236253b4f39a335 Date: 2021-05-12T16:45:26.313Z Electron: 12.0.4 Chrome: 89.0.4389.114 Node.js: 14.16.0 V8: 8.9.255.24-electron.0 OS: Linux x64 4.19.0-16-amd64

spydreb1t3 commented 3 years ago

I have the same issue on my VSCODE, it only seems to be the case if I attempt to right click on selected text as opposed to the area that is not selected, which is weird and random, but can be annoying if you need something from the context menu.

Version: 1.57.1 Commit: 507ce72a4466fbb27b715c3722558bb15afa9f48 Date: 2021-06-17T13:26:56.255Z Electron: 12.0.7 Chrome: 89.0.4389.128 Node.js: 14.16.0 V8: 8.9.255.25-electron.0 OS: Linux x64 5.8.0-59-generic

elesiuta commented 3 years ago

Since the issue is that vscode sometimes opens the context menu under the cursor instead of beside (especially when zoomed in), and that on some linux desktops the default behaviour is to open the context menu on right-click-press, with right-click-release behaving like a left-click, I found another workaround so that the context menu will open on right-click-release instead https://askubuntu.com/a/470219/919294

edit: if anyone is wondering since easystroke is an X11 application, this workaround still works with XWayland, and if/when vscode supports Wayland this will become a non-issue, since right-click-release does not trigger context menu entries for native Wayland applications (at least for the DE I use)

jseto commented 3 years ago

Since the issue is that vscode sometimes opens the context menu under the cursor instead of beside (especially when zoomed in), and that on some linux desktops the default behaviour is to open the context menu on right-click-press, with right-click-release behaving like a left-click, I found another workaround so that the context menu will open on right-click-release instead https://askubuntu.com/a/470219/919294

This is the hack that really works. Thanks @elesiuta