Right click from mouse immediately clicks on release - 20.04

So I’ve seen some very old forum questions about this issue, but could not find any known workaround that works in Ubuntu 20.04.

The issue:

When I right click I see the context menu, but it automatically clicks the first option and disappears. I first noticed this issue on VScode but have noticed that it also happens on various applications.

Apparently the normal behaviour in newer Ubuntu versions is to hold the right button and then release on the chosen menu option, and I wish I could change that. Old posts suggest that it is not possible but perhaps there is a new solution?

I tried:

I already tried using EasyStroke to create a custom behaviour for the right click, but even though it solves the presented issue, it ends up causing many other problems.

I also got a fresh Ubuntu install (for unrelated reasons) and the problem still persists.

I also switched mice to see if it was a hardware problem but had no success.

I noticed it happens mostly in certain parts of the screen near its middle (which makes me even more confused).

I’m a relatively new Ubuntu user, thanks in advance!

Links to people with the same problem (old / not solved):

https://superuser.com/questions/205678/the-right-button-of-my-mouse-clicks-on-release-ubuntu

https://github.com/microsoft/vscode/issues/113175

Right-click acts too fast - No Fix Yet, Any Workaround?

Especifications:

System: Ubuntu 20.04

Graphics Card: NVIDIA GTX-1050

USB mouse

1980 X 1080 60HZ Dell monitor


Solution 1:

I suspect the issue being that the context menu of right clicking is getting created right under the mouse cursor, and before the mouse release key event triggers, so when the menu is drawn, the release mouse key event triggers the entry that the cursor is hovering above (Devs should add some 5ms or so latency to ignore mouse release).

One way i could prevent this behaviour in laptops (Only works on touchpads as far as i know) Is by disabling Tap and Drag gesture in touchpad settings (I use KDE but i'm sure it's available in GNOME too).

A potential fix that looks promising but that i have not tried would be this : https://askubuntu.com/a/435004/1568112